You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2015/09/17 22:06:50 UTC

[13/17] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

Merge branch 'cassandra-2.1' into cassandra-2.2

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/6dcc89f8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6dcc89f8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6dcc89f8

Branch: refs/heads/cassandra-2.2
Commit: 6dcc89f814b9e9511353eb46decb64db572106f4
Parents: 416ba6e a5e282b
Author: Brandon Williams <br...@apache.org>
Authored: Thu Sep 17 15:03:13 2015 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Sep 17 15:03:13 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6dcc89f8/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 96ec0fa,5af30a5..f9314f6
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -22,8 -12,8 +22,9 @@@ Merged from 2.1
   * Only check KeyCache when it is enabled
   * Change streaming_socket_timeout_in_ms default to 1 hour (CASSANDRA-8611)
   * (cqlsh) update list of CQL keywords (CASSANDRA-9232)
 + * Add nodetool gettraceprobability command (CASSANDRA-10234)
  Merged from 2.0:
+  * Fix rare race where older gossip states can be shadowed (CASSANDRA-10366)
   * Fix consolidating racks violating the RF contract (CASSANDRA-10238)
   * Disallow decommission when node is in drained state (CASSANDRA-8741)
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6dcc89f8/src/java/org/apache/cassandra/gms/Gossiper.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/gms/Gossiper.java
index e61a35a,808972a..b6d1afc
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@@ -1143,8 -1149,7 +1143,7 @@@ public class Gossiper implements IFailu
  
          localState.setHeartBeatState(remoteState.getHeartBeatState());
          if (logger.isTraceEnabled())
 -            logger.trace("Updating heartbeat state version to " + localState.getHeartBeatState().getHeartBeatVersion() + " from " + oldVersion + " for " + addr + " ...");
 +            logger.trace("Updating heartbeat state version to {} from {} for {} ...", localState.getHeartBeatState().getHeartBeatVersion(), oldVersion, addr);
- 
          // we need to make two loops here, one to apply, then another to notify, this way all states in an update are present and current when the notifications are received
          for (Entry<ApplicationState, VersionedValue> remoteEntry : remoteState.getApplicationStateMap().entrySet())
          {
@@@ -1387,11 -1392,12 +1386,12 @@@
          endpointStateMap.put(ep, epState);
          unreachableEndpoints.put(ep, System.nanoTime());
          if (logger.isTraceEnabled())
 -            logger.trace("Adding saved endpoint " + ep + " " + epState.getHeartBeatState().getGeneration());
 +            logger.trace("Adding saved endpoint {} {}", ep, epState.getHeartBeatState().getGeneration());
      }
  
-     public void addLocalApplicationState(ApplicationState state, VersionedValue value)
+     private void addLocalApplicationStateInternal(ApplicationState state, VersionedValue value)
      {
+         assert taskLock.isHeldByCurrentThread();
          EndpointState epState = endpointStateMap.get(FBUtilities.getBroadcastAddress());
          InetAddress epAddr = FBUtilities.getBroadcastAddress();
          assert epState != null;