Merge branch 'cassandra-2.1' into trunk Conflicts: src/java/org/apache/cassandra/gms/Gossiper.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/65d5ef26 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/65d5ef26 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/65d5ef26 Branch: refs/heads/trunk Commit: 65d5ef26c50c2e394637f6ba1afe0b80fd1d36a2 Parents: c059a56 1376b8e Author: Brandon Williams <brandonwilli...@apache.org> Authored: Fri Mar 13 08:06:15 2015 -0500 Committer: Brandon Williams <brandonwilli...@apache.org> Committed: Fri Mar 13 08:06:15 2015 -0500 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/gms/EndpointState.java | 12 ++++++++++ src/java/org/apache/cassandra/gms/Gossiper.java | 25 +++++++++++++++----- 3 files changed, 32 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/65d5ef26/CHANGES.txt ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/65d5ef26/src/java/org/apache/cassandra/gms/Gossiper.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/gms/Gossiper.java index 4584044,ac98c53..1820c06 --- a/src/java/org/apache/cassandra/gms/Gossiper.java +++ b/src/java/org/apache/cassandra/gms/Gossiper.java @@@ -958,12 -959,14 +967,14 @@@ public class Gossiper implements IFailu logger.info("Node {} is now part of the cluster", ep); } if (logger.isTraceEnabled()) - logger.trace("Adding endpoint state for " + ep); + logger.trace("Adding endpoint state for {}", ep); endpointStateMap.put(ep, epState); - // the node restarted: it is up to the subscriber to take whatever action is necessary - for (IEndpointStateChangeSubscriber subscriber : subscribers) - subscriber.onRestart(ep, epState); + if (localEpState != null) + { // the node restarted: it is up to the subscriber to take whatever action is necessary + for (IEndpointStateChangeSubscriber subscriber : subscribers) + subscriber.onRestart(ep, localEpState); + } if (!isDeadState(epState)) markAlive(ep, epState); @@@ -1042,7 -1046,8 +1054,8 @@@ applyNewStates(ep, localEpStatePtr, remoteState); } else if (logger.isTraceEnabled()) - logger.trace("Ignoring remote version " + remoteMaxVersion + " <= " + localMaxVersion + " for " + ep); + logger.trace("Ignoring remote version {} <= {} for {}", remoteMaxVersion, localMaxVersion, ep); + if (!localEpStatePtr.isAlive() && !isDeadState(localEpStatePtr)) // unless of course, it was dead markAlive(ep, localEpStatePtr); }