cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r924519 - in /cassandra/branches/cassandra-0.6: CHANGES.txt src/java/org/apache/cassandra/dht/BootStrapper.java
Date Wed, 17 Mar 2010 22:11:54 GMT
Author: gdusbabek
Date: Wed Mar 17 22:11:53 2010
New Revision: 924519

URL: http://svn.apache.org/viewvc?rev=924519&view=rev
Log:
Bootstrapping may skip ranges under the right conditions. Patch by Gary Dusbabek, reviewed
by Jonathan Ellis. CASSANDRA-902

Modified:
    cassandra/branches/cassandra-0.6/CHANGES.txt
    cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/dht/BootStrapper.java

Modified: cassandra/branches/cassandra-0.6/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt?rev=924519&r1=924518&r2=924519&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.6/CHANGES.txt Wed Mar 17 22:11:53 2010
@@ -1,5 +1,6 @@
 dev
 * JMX drain to flush memtables and run through commit log (CASSANDRA-880)
+* Bootstrapping can skip ranges under the right conditions (CASSANDRA-902)
 
 0.6.0-beta3
  * fix compaction bucketing bug (CASSANDRA-814)

Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/dht/BootStrapper.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/dht/BootStrapper.java?rev=924519&r1=924518&r2=924519&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/dht/BootStrapper.java (original)
+++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/dht/BootStrapper.java Wed
Mar 17 22:11:53 2010
@@ -149,9 +149,9 @@ public class BootStrapper
 
         Multimap<Range, InetAddress> myRangeAddresses = ArrayListMultimap.create();
         Multimap<Range, InetAddress> rangeAddresses = strat.getRangeAddresses(tokenMetadata,
table);
-        for (Range range : rangeAddresses.keySet())
+        for (Range myRange : myRanges)
         {
-            for (Range myRange : myRanges)
+            for (Range range : rangeAddresses.keySet())
             {
                 if (range.contains(myRange))
                 {
@@ -160,6 +160,7 @@ public class BootStrapper
                     break;
                 }
             }
+            assert myRangeAddresses.keySet().contains(myRange);
         }
         return myRangeAddresses;
     }



Mime
View raw message