cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r896132 - in /incubator/cassandra/branches/cassandra-0.5: CHANGES.txt src/java/org/apache/cassandra/service/StorageService.java
Date Tue, 05 Jan 2010 17:16:36 GMT
Author: jbellis
Date: Tue Jan  5 17:16:35 2010
New Revision: 896132

URL: http://svn.apache.org/viewvc?rev=896132&view=rev
Log:
Abort bootstrap if IP is already in the token ring.  patch by jbellis; reviewed by jaakko
for CASSANDRA-663

Modified:
    incubator/cassandra/branches/cassandra-0.5/CHANGES.txt
    incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java

Modified: incubator/cassandra/branches/cassandra-0.5/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/CHANGES.txt?rev=896132&r1=896131&r2=896132&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/CHANGES.txt (original)
+++ incubator/cassandra/branches/cassandra-0.5/CHANGES.txt Tue Jan  5 17:16:35 2010
@@ -4,6 +4,7 @@
  * TcpConnectionManager was holding on to disconnected connections, 
    giving the false indication they were being used. (CASSANDRA-651)
  * Avoid redundant write of the same mutation. (CASSANDRA-662)
+ * Abort bootstrap if IP is already in the token ring (CASSANDRA-663)
 
 
 0.5.0 RC1

Modified: incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java?rev=896132&r1=896131&r2=896132&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java
(original)
+++ incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java
Tue Jan  5 17:16:35 2010
@@ -340,6 +340,11 @@
         {
             throw new AssertionError(e);
         }
+        if (tokenMetadata_.isMember(FBUtilities.getLocalAddress()))
+        {
+            String s = "This node is already a member of the token ring; bootstrap aborted.
(If replacing a dead node, remove the old one from the ring first.)";
+            throw new UnsupportedOperationException(s);
+        }
         new BootStrapper(replicationStrategy_, FBUtilities.getLocalAddress(), token, tokenMetadata_).startBootstrap();
// handles token update
     }
 



Mime
View raw message