cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [09/15] cassandra git commit: Merge commit '3c55732fa414c7835536dc42ff489461a7441bfe' into cassandra-2.2
Date Fri, 22 Jan 2016 14:45:56 GMT
Merge commit '3c55732fa414c7835536dc42ff489461a7441bfe' into cassandra-2.2


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

Branch: refs/heads/cassandra-3.3
Commit: 0b479a7f3e284960f5ebf8ef5110dfdf2c2db7fd
Parents: 7bab824 3c55732
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Fri Jan 22 15:42:27 2016 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Fri Jan 22 15:43:56 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/gms/Gossiper.java | 10 ++-
 .../org/apache/cassandra/gms/GossiperTest.java  | 93 ++++++++++++++++++++
 3 files changed, 100 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0b479a7f/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 54ed851,4bff88c..6c01e22
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,30 -1,8 +1,31 @@@
 -2.1.13
 +2.2.5
 + * Avoid over-fetching during the page of range queries (CASSANDRA-8521)
 + * Start L0 STCS-compactions even if there is a L0 -> L1 compaction
 +   going (CASSANDRA-10979)
 + * Make UUID LSB unique per process (CASSANDRA-7925)
 + * Avoid NPE when performing sstable tasks (scrub etc.) (CASSANDRA-10980)
 + * Make sure client gets tombstone overwhelmed warning (CASSANDRA-9465)
 + * Fix error streaming section more than 2GB (CASSANDRA-10961)
 + * (cqlsh) Also apply --connect-timeout to control connection
 +   timeout (CASSANDRA-10959)
 + * Histogram buckets exposed in jmx are sorted incorrectly (CASSANDRA-10975)
 + * Enable GC logging by default (CASSANDRA-10140)
 + * Optimize pending range computation (CASSANDRA-9258)
 + * Skip commit log and saved cache directories in SSTable version startup check (CASSANDRA-10902)
 + * drop/alter user should be case sensitive (CASSANDRA-10817)
 + * jemalloc detection fails due to quoting issues in regexv (CASSANDRA-10946)
 + * Support counter-columns for native aggregates (sum,avg,max,min) (CASSANDRA-9977)
 + * (cqlsh) show correct column names for empty result sets (CASSANDRA-9813)
 + * Add new types to Stress (CASSANDRA-9556)
 + * Add property to allow listening on broadcast interface (CASSANDRA-9748)
 + * Fix regression in split size on CqlInputFormat (CASSANDRA-10835)
 + * Better handling of SSL connection errors inter-node (CASSANDRA-10816)
 + * Disable reloading of GossipingPropertyFileSnitch (CASSANDRA-9474)
 + * Verify tables in pseudo-system keyspaces at startup (CASSANDRA-10761)
 +Merged from 2.1:
+  * Fix bad gossip generation seen in long-running clusters (CASSANDRA-10969)
   * Avoid NPE when incremental repair fails (CASSANDRA-10909)
   * Unmark sstables compacting once they are done in cleanup/scrub/upgradesstables (CASSANDRA-10829)
 - * Revert CASSANDRA-10012 and add more logging (CASSANDRA-10961)
   * Allow simultaneous bootstrapping with strict consistency when no vnodes are used (CASSANDRA-11005)
   * Log a message when major compaction does not result in a single file (CASSANDRA-10847)
   * (cqlsh) fix cqlsh_copy_tests when vnodes are disabled (CASSANDRA-10997)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0b479a7f/src/java/org/apache/cassandra/gms/Gossiper.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/gms/Gossiper.java
index 6a91750,ebdd5bd..58d9c3c
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@@ -87,9 -87,9 +87,9 @@@ public class Gossiper implements IFailu
  
      public static final long aVeryLongTime = 259200 * 1000; // 3 days
  
-     /** Maximum difference in generation and version values we are willing to accept about
a peer */
-     private static final long MAX_GENERATION_DIFFERENCE = 86400 * 365;
+     // Maximimum difference between generation value and local time we are willing to accept
about a peer
+     static final int MAX_GENERATION_DIFFERENCE = 86400 * 365;
 -    private long FatClientTimeout;
 +    private long fatClientTimeout;
      private final Random random = new Random();
      private final Comparator<InetAddress> inetcomparator = new Comparator<InetAddress>()
      {
@@@ -1101,13 -1107,15 +1101,15 @@@
              {
                  int localGeneration = localEpStatePtr.getHeartBeatState().getGeneration();
                  int remoteGeneration = remoteState.getHeartBeatState().getGeneration();
+                 long localTime = System.currentTimeMillis()/1000;
                  if (logger.isTraceEnabled())
 -                    logger.trace(ep + "local generation " + localGeneration + ", remote
generation " + remoteGeneration);
 +                    logger.trace("{} local generation {}, remote generation {}", ep, localGeneration,
remoteGeneration);
  
-                 if (localGeneration != 0 && remoteGeneration > localGeneration
+ MAX_GENERATION_DIFFERENCE)
+                 // We measure generation drift against local time, based on the fact that
generation is initialized by time
+                 if (remoteGeneration > localTime + 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);
+                     logger.warn("received an invalid gossip generation for peer {}; local
time = {}, received generation = {}", ep, localTime, remoteGeneration);
                  }
                  else if (remoteGeneration > localGeneration)
                  {


Mime
View raw message