Author: jbellis
Date: Mon Nov 23 19:43:49 2009
New Revision: 883474

URL: http://svn.apache.org/viewvc?rev=883474&view=rev
Log:
add RING_DELAY sleep to startBootstrap.  patch by Jaakko Laine; reviewed by 
jbellis for CASSANDRA-575

Modified:
    
incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java

Modified: 
incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
URL: 
http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java?rev=883474&r1=883473&r2=883474&view=diff
==============================================================================
--- 
incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
 (original)
+++ 
incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
 Mon Nov 23 19:43:49 2009
@@ -309,6 +309,15 @@
         isBootstrapMode = true;
         SystemTable.updateToken(token); // DON'T use setToken, that makes us 
part of the ring locally which is incorrect until we are done bootstrapping
         
Gossiper.instance().addApplicationState(StorageService.STATE_BOOTSTRAPPING, new 
ApplicationState(partitioner_.getTokenFactory().toString(token)));
+        logger_.info("bootstrap sleeping " + Streaming.RING_DELAY);
+        try
+        {
+            Thread.sleep(Streaming.RING_DELAY);
+        }
+        catch (InterruptedException e)
+        {
+            throw new AssertionError(e);
+        }
         new BootStrapper(replicationStrategy_, FBUtilities.getLocalAddress(), 
token, tokenMetadata_).startBootstrap(); // handles token update
     }
 


Reply via email to