Merge branch 'cassandra-2.1' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/18549038 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/18549038 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/18549038 Branch: refs/heads/trunk Commit: 18549038a1ea76a48b2bb4a3eede642978ef966d Parents: 6630b87 8be8a08 Author: Jason Brown <jasedbr...@gmail.com> Authored: Tue Oct 14 14:56:33 2014 -0700 Committer: Jason Brown <jasedbr...@gmail.com> Committed: Tue Oct 14 14:56:33 2014 -0700 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/gms/Gossiper.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/18549038/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index 5dac7f4,6d9d221..be84b11 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,34 -1,5 +1,35 @@@ +3.0 + * Keep sstable levels when bootstrapping (CASSANDRA-7460) + * Add Sigar library and perform basic OS settings check on startup (CASSANDRA-7838) + * Support for aggregation functions (CASSANDRA-4914) + * Remove cassandra-cli (CASSANDRA-7920) + * Accept dollar quoted strings in CQL (CASSANDRA-7769) + * Make assassinate a first class command (CASSANDRA-7935) + * Support IN clause on any clustering column (CASSANDRA-4762) + * Improve compaction logging (CASSANDRA-7818) + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917) + * Do anticompaction in groups (CASSANDRA-6851) + * Support pure user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 7929, + 7924, 7812, 8063) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + * Fail on very large batch sizes (CASSANDRA-8011) + * improve concurrency of repair (CASSANDRA-6455) + + 2.1.1 + * Gossip should ignore generation numbers too far in the future (CASSANDRA-8113) * Fix NPE when creating a table with frozen sets, lists (CASSANDRA-8104) * Fix high memory use due to tracking reads on incrementally opened sstable readers (CASSANDRA-8066) http://git-wip-us.apache.org/repos/asf/cassandra/blob/18549038/src/java/org/apache/cassandra/gms/Gossiper.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/gms/Gossiper.java index c488b09,ae8bf32..364837d --- a/src/java/org/apache/cassandra/gms/Gossiper.java +++ b/src/java/org/apache/cassandra/gms/Gossiper.java @@@ -990,12 -985,18 +993,18 @@@ public class Gossiper implements IFailu int localGeneration = localEpStatePtr.getHeartBeatState().getGeneration(); int remoteGeneration = remoteState.getHeartBeatState().getGeneration(); if (logger.isTraceEnabled()) - logger.trace(ep + "local generation " + localGeneration + ", remote generation " + remoteGeneration); + logger.trace("{} local generation {}, remote generation {}", ep, localGeneration, remoteGeneration); - if (remoteGeneration > localGeneration) + if (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); + continue; + } + else if (remoteGeneration > localGeneration) { if (logger.isTraceEnabled()) - logger.trace("Updating heartbeat state generation to " + remoteGeneration + " from " + localGeneration + " for " + ep); + logger.trace("Updating heartbeat state generation to {} from {} for {}", remoteGeneration, localGeneration, ep); // major state change will handle the update by inserting the remote state directly handleMajorStateChange(ep, remoteState); }