cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [6/7] git commit: Don't do generation safety check when the local gen is zero
Date Fri, 17 Oct 2014 20:14:40 GMT
Don't do generation safety check when the local gen is zero

Patch by brandonwilliams, reviewed by jasobrown for CASSANDRA-8113


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

Branch: refs/heads/cassandra-2.1
Commit: 42f85904221aeaf0181f75af2fa5d469b8cbcee7
Parents: b84d06f
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Fri Oct 17 15:13:26 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Fri Oct 17 15:13:26 2014 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/gms/Gossiper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/42f85904/src/java/org/apache/cassandra/gms/Gossiper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java b/src/java/org/apache/cassandra/gms/Gossiper.java
index 5f0e576..3fdee88 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -987,7 +987,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
                 if (logger.isTraceEnabled())
                     logger.trace(ep + "local generation " + localGeneration + ", remote generation
" + remoteGeneration);
 
-                if (remoteGeneration > localGeneration + MAX_GENERATION_DIFFERENCE)
+                if (localGeneration != 0 && remoteGeneration > localGeneration
+ MAX_GENERATION_DIFFERENCE)
                 {
                     // assume some peer has corrupted memory and is broadcasting an unbelievable
generation about another peer (or itself)
                     logger.warn("received an invalid gossip generation for peer {}; local
generation = {}, received generation = {}", ep, localGeneration, remoteGeneration);


Mime
View raw message