cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject svn commit: r1187333 - in /cassandra/branches/cassandra-0.8: CHANGES.txt src/java/org/apache/cassandra/io/sstable/SSTableReader.java src/java/org/apache/cassandra/service/AntiEntropyService.java
Date Fri, 21 Oct 2011 13:33:51 GMT
Author: slebresne
Date: Fri Oct 21 13:33:51 2011
New Revision: 1187333

URL: http://svn.apache.org/viewvc?rev=1187333&view=rev
Log:
fix assertion error during repair with ordered partitioners
patch by slebresne; reviewed by jbellis for CASSANDRA-3369

Modified:
    cassandra/branches/cassandra-0.8/CHANGES.txt
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AntiEntropyService.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1187333&r1=1187332&r2=1187333&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Fri Oct 21 13:33:51 2011
@@ -26,6 +26,7 @@
  * correct dropped messages logging (CASSANDRA-3377)
  * CLI `describe keyspace <ks>` to show "Row Cache Provider" (CASSANDRA-3384)
  * avoid locking on update when no indexes are involved (CASSANDRA-3386)
+ * fix assertionError during repair with ordered partitioners (CASSANDRA-3369)
 
 
 0.8.7

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/sstable/SSTableReader.java?rev=1187333&r1=1187332&r2=1187333&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
Fri Oct 21 13:33:51 2011
@@ -429,8 +429,10 @@ public class SSTableReader extends SSTab
                 // range are end inclusive so we use the previous index from what binarySearch
give us
                 // since that will be the last index we will return
                 right = (right + 1) * -1;
-                if (right > 0)
-                    right--;
+                if (right == 0)
+                    // Means the first key is already stricly greater that the right bound
+                    continue;
+                right--;
             }
 
             if (left >= right)

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AntiEntropyService.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AntiEntropyService.java?rev=1187333&r1=1187332&r2=1187333&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AntiEntropyService.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/service/AntiEntropyService.java
Fri Oct 21 13:33:51 2011
@@ -281,7 +281,7 @@ public class AntiEntropyService
                 List<DecoratedKey> keys = new ArrayList<DecoratedKey>();
                 for (DecoratedKey sample : cfs.keySamples(request.range))
                 {
-                    assert request.range.contains(sample.token);
+                    assert request.range.contains(sample.token): "Token " + sample.token
+ " is not within range " + request.range;
                     keys.add(sample);
                 }
 



Mime
View raw message