cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [1/3] git commit: Fix snapshot repair error on indexed tables
Date Thu, 02 Oct 2014 17:18:23 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 f0893f544 -> ca224b323
  refs/heads/trunk d4c1e9c7d -> a479fe09b


Fix snapshot repair error on indexed tables

patch by yukim; reviewed by jbellis for CASSANDRA-8020


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ca224b32
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ca224b32
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ca224b32

Branch: refs/heads/cassandra-2.1
Commit: ca224b323975da298c41d4f5f8c7b17d0cd63e0a
Parents: f0893f5
Author: Yuki Morishita <yukim@apache.org>
Authored: Thu Oct 2 12:15:22 2014 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Thu Oct 2 12:15:22 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                     | 1 +
 .../org/apache/cassandra/repair/RepairMessageVerbHandler.java   | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca224b32/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3c3b838..e86ad5b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -54,6 +54,7 @@
  * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
  * Make repair -pr work with -local (CASSANDRA-7450)
  * Fix error in sstableloader with -cph > 1 (CASSANDRA-8007)
+ * Fix snapshot repair error on indexed tables (CASSANDRA-8020)
 Merged from 2.0:
  * Fix potential exception when using ReversedType in DynamicCompositeType
    (CASSANDRA-7898)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca224b32/src/java/org/apache/cassandra/repair/RepairMessageVerbHandler.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/repair/RepairMessageVerbHandler.java b/src/java/org/apache/cassandra/repair/RepairMessageVerbHandler.java
index 2dac5cd..54117a3 100644
--- a/src/java/org/apache/cassandra/repair/RepairMessageVerbHandler.java
+++ b/src/java/org/apache/cassandra/repair/RepairMessageVerbHandler.java
@@ -32,6 +32,7 @@ import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.Keyspace;
 import org.apache.cassandra.db.compaction.CompactionManager;
 import org.apache.cassandra.dht.Bounds;
+import org.apache.cassandra.dht.LocalPartitioner;
 import org.apache.cassandra.dht.Range;
 import org.apache.cassandra.dht.Token;
 import org.apache.cassandra.io.sstable.SSTableReader;
@@ -80,7 +81,9 @@ public class RepairMessageVerbHandler implements IVerbHandler<RepairMessage>
                 {
                     public boolean apply(SSTableReader sstable)
                     {
-                        return sstable != null && new Bounds<>(sstable.first.getToken(),
sstable.last.getToken()).intersects(Collections.singleton(repairingRange));
+                        return sstable != null &&
+                               !(sstable.partitioner instanceof LocalPartitioner) &&
// exclude SSTables from 2i
+                               new Bounds<>(sstable.first.getToken(), sstable.last.getToken()).intersects(Collections.singleton(repairingRange));
                     }
                 });
 


Mime
View raw message