Author: brandonwilliams
Date: Fri Oct 22 21:12:18 2010
New Revision: 1026494

URL: http://svn.apache.org/viewvc?rev=1026494&view=rev
Log:
Don't wait for confirmation when removing token and RF=1.  Patch by Nick 
Bailey, reviewed by brandonwilliams for CASSANDRA-1650

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

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java?rev=1026494&r1=1026493&r2=1026494&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java 
Fri Oct 22 21:12:18 2010
@@ -1779,6 +1779,10 @@ public class StorageService implements I
         replicatingNodes = Collections.synchronizedSet(new 
HashSet<InetAddress>());
         for (String table : DatabaseDescriptor.getNonSystemTables())
         {
+            // if the replication factor is 1 the data is lost so we shouldn't 
wait for confirmation
+            if (DatabaseDescriptor.getReplicationFactor(table) == 1)
+                continue;
+
             // get all ranges that change ownership (that is, a node needs
             // to take responsibility for new range)
             Multimap<Range, InetAddress> changedRanges = 
getChangedRangesForLeaving(table, endpoint);


Reply via email to