You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2014/02/12 17:40:58 UTC

[1/2] git commit: Don't exchange schema between nodes with different versions

Updated Branches:
  refs/heads/cassandra-2.0 80cebec5d -> babc2de3e


Don't exchange schema between nodes with different versions

patch by Aleksey Yeschenko; reviewed by Piotr Kołaczkowski for
CASSANDRA-6695


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

Branch: refs/heads/cassandra-2.0
Commit: b2dfaed3170c8b5b96a7ea8e7df6129490ead3be
Parents: 00a8b1e
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Wed Feb 12 19:37:34 2014 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Wed Feb 12 19:37:34 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../cassandra/service/MigrationManager.java     | 20 ++++++++------------
 2 files changed, 9 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b2dfaed3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0674dde..de7c307 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -5,6 +5,7 @@
  * Fix mean cells and mean row size per sstable calculations (CASSANDRA-6667)
  * Compact hints after partial replay to clean out tombstones (CASSANDRA-6666)
  * Log USING TTL/TIMESTAMP in a counter update warning (CASSANDRA-6649)
+ * Don't exchange schema between nodes with different versions (CASSANDRA-6695)
 
 
 1.2.15

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b2dfaed3/src/java/org/apache/cassandra/service/MigrationManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/MigrationManager.java b/src/java/org/apache/cassandra/service/MigrationManager.java
index 5a02e3b..68d0bad 100644
--- a/src/java/org/apache/cassandra/service/MigrationManager.java
+++ b/src/java/org/apache/cassandra/service/MigrationManager.java
@@ -134,13 +134,11 @@ public class MigrationManager
     private static boolean shouldPullSchemaFrom(InetAddress endpoint)
     {
         /*
-         * Don't request schema from nodes with versions younger than 1.1.7 (timestamps in versions prior to 1.1.7 are broken)
-         * Don't request schema from nodes with a higher major (may have incompatible schema)
+         * Don't request schema from nodes with a differnt or unknonw major version (may have incompatible schema)
          * Don't request schema from fat clients
          */
         return MessagingService.instance().knowsVersion(endpoint)
-                && MessagingService.instance().getVersion(endpoint) >= MessagingService.VERSION_117
-                && MessagingService.instance().getVersion(endpoint) <= MessagingService.current_version
+                && MessagingService.instance().getVersion(endpoint) == MessagingService.current_version
                 && !Gossiper.instance.isFatClient(endpoint);
     }
 
@@ -291,15 +289,13 @@ public class MigrationManager
 
         for (InetAddress endpoint : Gossiper.instance.getLiveMembers())
         {
-            if (endpoint.equals(FBUtilities.getBroadcastAddress()))
-                continue; // we've dealt with localhost already
-
-            // don't send schema to the nodes with the versions older than current major
-            if (MessagingService.instance().getVersion(endpoint) < MessagingService.current_version)
-                continue;
-
-            pushSchemaMutation(endpoint, schema);
+            // only push schema to nodes with known and equal versions
+            if (!endpoint.equals(FBUtilities.getBroadcastAddress()) &&
+                    MessagingService.instance().knowsVersion(endpoint) &&
+                    MessagingService.instance().getVersion(endpoint) == MessagingService.current_version)
+                pushSchemaMutation(endpoint, schema);
         }
+
         return f;
     }
 


[2/2] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

Posted by al...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	src/java/org/apache/cassandra/service/MigrationManager.java


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

Branch: refs/heads/cassandra-2.0
Commit: babc2de3e58e41b0dc2b9534c4514adfdd54be37
Parents: 80cebec b2dfaed
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Wed Feb 12 19:40:46 2014 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Wed Feb 12 19:40:46 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                       |  1 +
 .../cassandra/service/MigrationManager.java       | 18 ++++++++----------
 2 files changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/babc2de3/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index f9b2032,de7c307..a4dc8fd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -17,33 -5,24 +17,34 @@@ Merged from 1.2
   * Fix mean cells and mean row size per sstable calculations (CASSANDRA-6667)
   * Compact hints after partial replay to clean out tombstones (CASSANDRA-6666)
   * Log USING TTL/TIMESTAMP in a counter update warning (CASSANDRA-6649)
+  * Don't exchange schema between nodes with different versions (CASSANDRA-6695)
  
 -
 -1.2.15
 - * Move handling of migration event source to solve bootstrap race (CASSANDRA-6648)
 - * Make sure compaction throughput value doesn't overflow with int math (CASSANDRA-6647)
 -
 -
 -1.2.14
 - * Reverted code to limit CQL prepared statement cache by size (CASSANDRA-6592)
 - * add cassandra.default_messaging_version property to allow easier
 -   upgrading from 1.1 (CASSANDRA-6619)
 - * Allow executing CREATE statements multiple times (CASSANDRA-6471)
 - * Don't send confusing info with timeouts (CASSANDRA-6491)
 - * Don't resubmit counter mutation runnables internally (CASSANDRA-6427)
 - * Don't drop local mutations without a hint (CASSANDRA-6510)
 - * Don't allow null max_hint_window_in_ms (CASSANDRA-6419)
 - * Validate SliceRange start and finish lengths (CASSANDRA-6521)
 +2.0.5
 + * Reduce garbage generated by bloom filter lookups (CASSANDRA-6609)
 + * Add ks.cf names to tombstone logging (CASSANDRA-6597)
 + * Use LOCAL_QUORUM for LWT operations at LOCAL_SERIAL (CASSANDRA-6495)
 + * Wait for gossip to settle before accepting client connections (CASSANDRA-4288)
 + * Delete unfinished compaction incrementally (CASSANDRA-6086)
 + * Allow specifying custom secondary index options in CQL3 (CASSANDRA-6480)
 + * Improve replica pinning for cache efficiency in DES (CASSANDRA-6485)
 + * Fix LOCAL_SERIAL from thrift (CASSANDRA-6584)
 + * Don't special case received counts in CAS timeout exceptions (CASSANDRA-6595)
 + * Add support for 2.1 global counter shards (CASSANDRA-6505)
 + * Fix NPE when streaming connection is not yet established (CASSANDRA-6210)
 + * Avoid rare duplicate read repair triggering (CASSANDRA-6606)
 + * Fix paging discardFirst (CASSANDRA-6555)
 + * Fix ArrayIndexOutOfBoundsException in 2ndary index query (CASSANDRA-6470)
 + * Release sstables upon rebuilding 2i (CASSANDRA-6635)
 + * Add AbstractCompactionStrategy.startup() method (CASSANDRA-6637)
 + * SSTableScanner may skip rows during cleanup (CASSANDRA-6638)
 + * sstables from stalled repair sessions can resurrect deleted data (CASSANDRA-6503)
 + * Switch stress to use ITransportFactory (CASSANDRA-6641)
 + * Fix IllegalArgumentException during prepare (CASSANDRA-6592)
 + * Fix possible loss of 2ndary index entries during compaction (CASSANDRA-6517)
 + * Fix direct Memory on architectures that do not support unaligned long access
 +   (CASSANDRA-6628)
 + * Let scrub optionally skip broken counter partitions (CASSANDRA-5930)
 +Merged from 1.2:
   * fsync compression metadata (CASSANDRA-6531)
   * Validate CF existence on execution for prepared statement (CASSANDRA-6535)
   * Add ability to throttle batchlog replay (CASSANDRA-6550)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/babc2de3/src/java/org/apache/cassandra/service/MigrationManager.java
----------------------------------------------------------------------