cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [08/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Date Thu, 03 Apr 2014 20:50:57 GMT
Merge branch 'cassandra-2.0' into cassandra-2.1


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4717d276
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4717d276
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4717d276

Branch: refs/heads/cassandra-2.1
Commit: 4717d2769addfaa4bb016bc5f933c602aa110e39
Parents: f3d8ecf 123d5bc
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu Apr 3 12:42:44 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu Apr 3 12:42:44 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     | 1 +
 src/java/org/apache/cassandra/gms/Gossiper.java | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4717d276/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4717d276/src/java/org/apache/cassandra/gms/Gossiper.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/gms/Gossiper.java
index a7c4f97,f014ac0..2b921cd
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@@ -500,11 -500,13 +500,13 @@@ public class Gossiper implements IFailu
                  tokens = Collections.singletonList(StorageService.getPartitioner().getRandomToken());
              }
              int generation = epState.getHeartBeatState().getGeneration();
 -            logger.info("Sleeping for " + StorageService.RING_DELAY + "ms to ensure " +
endpoint + " does not change");
 +            logger.info("Sleeping for {}ms to ensure {} does not change", StorageService.RING_DELAY,
endpoint);
              Uninterruptibles.sleepUninterruptibly(StorageService.RING_DELAY, TimeUnit.MILLISECONDS);
              // make sure it did not change
-             epState = endpointStateMap.get(endpoint);
-             if (epState.getHeartBeatState().getGeneration() != generation)
+             EndpointState newState = endpointStateMap.get(endpoint);
+             if (newState == null)
+                 logger.warn("Endpoint {} disappeared while trying to assassinate, continuing
anyway", endpoint);
+             else if (newState.getHeartBeatState().getGeneration() != generation)
                  throw new RuntimeException("Endpoint " + endpoint + " generation changed
while trying to remove it");
              epState.updateTimestamp(); // make sure we don't evict it too soon
              epState.getHeartBeatState().forceNewerGenerationUnsafe();


Mime
View raw message