Fix unwanted schema pull while upgrading nodes from 1.2 to 2.0
Patch by Sergio Bossa, reviewed by brandonwilliams for CASSANDRA-6678


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

Branch: refs/heads/cassandra-2.0
Commit: 31414fb871c073a19a02dce5dda70bf3df0e5888
Parents: 8b6d87b
Author: Brandon Williams <brandonwilli...@apache.org>
Authored: Fri Feb 7 08:34:00 2014 -0600
Committer: Brandon Williams <brandonwilli...@apache.org>
Committed: Fri Feb 7 08:34:00 2014 -0600

----------------------------------------------------------------------
 src/java/org/apache/cassandra/service/MigrationManager.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31414fb8/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 37d5f43..fd9eeda 100644
--- a/src/java/org/apache/cassandra/service/MigrationManager.java
+++ b/src/java/org/apache/cassandra/service/MigrationManager.java
@@ -138,9 +138,10 @@ public class MigrationManager
          * Don't request schema from nodes with a higher major (may have 
incompatible schema)
          * Don't request schema from fat clients
          */
-        return MessagingService.instance().getVersion(endpoint) >= 
MessagingService.VERSION_117
-            && MessagingService.instance().getVersion(endpoint) <= 
MessagingService.current_version
-            && !Gossiper.instance.isFatClient(endpoint);
+        return MessagingService.instance().knowsVersion(endpoint)
+                && MessagingService.instance().getVersion(endpoint) >= 
MessagingService.VERSION_117
+                && MessagingService.instance().getVersion(endpoint) <= 
MessagingService.current_version
+                && !Gossiper.instance.isFatClient(endpoint);
     }
 
     public static boolean isReadyForBootstrap()

Reply via email to