jacek-lewandowski commented on a change in pull request #892:
URL: https://github.com/apache/cassandra/pull/892#discussion_r578204362



##########
File path: src/java/org/apache/cassandra/gms/Gossiper.java
##########
@@ -2130,7 +2136,12 @@ public boolean waitForSchemaAgreement(long maxWait, 
TimeUnit unit, BooleanSuppli
 
     public boolean haveMajorVersion3Nodes()
     {
-        return haveMajorVersion3NodesMemoized.get();
+        return isUpgradingFromVersionLowerThan(4, 0);
+    }
+
+    public boolean isUpgradingFromVersionLowerThan(int major, int minor) {
+        CassandraVersion v = upgradeFromVersionMemoized.get();
+        return v != null && v.isLowerThan(major, minor);

Review comment:
       So this is about which type of upgrades we want to optimise for during 
that ephemeral period - if for 3 -> 4, then we should stay with the current 
approach, if for 4 -> 4, we should just skip hosts with `null` version. 
   
   I was wondering if there is a way to figure out whether the node has started 
for the first time with Cassandra 3 data (first started after upgrade). SSTable 
format has changed to `na` but I don't know if we force rewrite some system 
tables to the new format after startup. I'm just saying that if we could detect 
that the node has started for the first time after upgrading it from Cassandra 
3, we could assume the current approach, otherwise we could skip null versions.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to