cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r916008 - /incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java
Date Wed, 24 Feb 2010 22:33:02 GMT
Author: jbellis
Date: Wed Feb 24 22:33:02 2010
New Revision: 916008

URL: http://svn.apache.org/viewvc?rev=916008&view=rev
Log:
null check wasn't redundant after all.  patch by gabriele renzi; reviewed by jbellis for CASSNDRA-828

Modified:
    incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java

Modified: incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java?rev=916008&r1=916007&r2=916008&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java
(original)
+++ incubator/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/service/StorageService.java
Wed Feb 24 22:33:02 2010
@@ -603,14 +603,17 @@
             // let's make sure that we're not removing ourselves. This can happen when a
node
             // enters ring as a replacement for a removed node. removeToken for the old node
is
             // still in gossip, so we will see it.
-            if (endPointThatLeft.equals(FBUtilities.getLocalAddress()))
+            if (FBUtilities.getLocalAddress().equals(endPointThatLeft))
             {
                 logger_.info("Received removeToken gossip about myself. Is this node a replacement
for a removed one?");
                 return;
             }
             if (logger_.isDebugEnabled())
                 logger_.debug("Token " + token + " removed manually (endpoint was " + ((endPointThatLeft
== null) ? "unknown" : endPointThatLeft) + ")");
-            removeEndPointLocally(endPointThatLeft);
+            if (endPointThatLeft != null)
+            {
+                removeEndPointLocally(endPointThatLeft);
+            }
         }
 
         // remove token from bootstrap tokens just in case it is still there



Mime
View raw message