cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [3/3] git commit: Merge branch 'cassandra-1.2' into trunk
Date Tue, 25 Jun 2013 19:19:14 GMT
Merge branch 'cassandra-1.2' into trunk

Conflicts:
	CHANGES.txt


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

Branch: refs/heads/trunk
Commit: 2c271e2c0d957b6ebfcea4dcd70f3c8b8c6cf0cd
Parents: a607ee0 a6ca5d4
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue Jun 25 14:18:53 2013 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue Jun 25 14:18:53 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 +
 src/java/org/apache/cassandra/gms/Gossiper.java | 46 +++++++++-----------
 2 files changed, 23 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2c271e2c/src/java/org/apache/cassandra/gms/Gossiper.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/gms/Gossiper.java
index 46f19f5,efa9865..a74da02
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@@ -874,28 -871,20 +874,20 @@@ public class Gossiper implements IFailu
                      if (logger.isTraceEnabled())
                          logger.trace("Updating heartbeat state generation to " + remoteGeneration
+ " from " + localGeneration + " for " + ep);
                      // major state change will handle the update by inserting the remote
state directly
-                     copyNewerApplicationStates(remoteState, localEpStatePtr);
                      handleMajorStateChange(ep, remoteState);
                  }
 -                else if ( remoteGeneration == localGeneration ) // generation has not changed,
apply new states
 +                else if (remoteGeneration == localGeneration) // generation has not changed,
apply new states
                  {
                      /* find maximum state */
                      int localMaxVersion = getMaxEndpointStateVersion(localEpStatePtr);
                      int remoteMaxVersion = getMaxEndpointStateVersion(remoteState);
 -                    if ( remoteMaxVersion > localMaxVersion )
 +                    if (remoteMaxVersion > localMaxVersion)
                      {
-                         if (logger.isTraceEnabled())
-                         {
-                             logger.trace("Updating heartbeat state version to " + remoteState.getHeartBeatState().getHeartBeatVersion()
+
-                                     " from " + localEpStatePtr.getHeartBeatState().getHeartBeatVersion()
+ " for " + ep);
-                         }
-                         localEpStatePtr.setHeartBeatState(remoteState.getHeartBeatState());
-                         Map<ApplicationState, VersionedValue> merged = copyNewerApplicationStates(localEpStatePtr,
remoteState);
-                         for (Entry<ApplicationState, VersionedValue> appState : merged.entrySet())
-                             doNotifications(ep, appState.getKey(), appState.getValue());
+                         // apply states, but do not notify since there is no major change
+                         applyNewStates(ep, localEpStatePtr, remoteState);
                      }
                      else if (logger.isTraceEnabled())
-                         logger.trace("Ignoring remote version " + remoteMaxVersion + " <=
" + localMaxVersion + " for " + ep);
+                             logger.trace("Ignoring remote version " + remoteMaxVersion +
" <= " + localMaxVersion + " for " + ep);
                      if (!localEpStatePtr.isAlive() && !isDeadState(localEpStatePtr))
// unless of course, it was dead
                          markAlive(ep, localEpStatePtr);
                  }


Mime
View raw message