aparna0522 commented on code in PR #4614:
URL: https://github.com/apache/cassandra/pull/4614#discussion_r2813757585


##########
src/java/org/apache/cassandra/tcm/transformations/Register.java:
##########
@@ -74,6 +74,22 @@ public Kind kind()
     @Override
     public Result execute(ClusterMetadata prev)
     {
+        // Ensure the joining node can read existing cluster metadata.
+        // Skip check for empty directory (first node in a new cluster).
+        if (!prev.directory.isEmpty())
+        {
+            Version clusterVersion = prev.directory.commonSerializationVersion;
+            Version newNodeVersion = version.serializationVersion();
+            if (newNodeVersion.isBefore(clusterVersion))
+            {
+                return new Rejected(INVALID,
+                                    String.format("Cannot register node: this 
node's metadata serialization version %s " +

Review Comment:
   The recovery strategy here is to upgrade the joining node to a cassandra 
version that supports the required metadata serialization version, so usually 
you can think of it as 
    `Node Cassandra version > minimum serialization version.`
   I felt this was reasonably implied by the error message, but I'm open to 
adding extra level details or hints if you feel it would helpful. What level of 
detail do you have in mind? 



##########
src/java/org/apache/cassandra/tcm/transformations/Register.java:
##########
@@ -74,6 +74,22 @@ public Kind kind()
     @Override
     public Result execute(ClusterMetadata prev)
     {
+        // Ensure the joining node can read existing cluster metadata.
+        // Skip check for empty directory (first node in a new cluster).
+        if (!prev.directory.isEmpty())
+        {
+            Version clusterVersion = prev.directory.commonSerializationVersion;
+            Version newNodeVersion = version.serializationVersion();
+            if (newNodeVersion.isBefore(clusterVersion))
+            {
+                return new Rejected(INVALID,
+                                    String.format("Cannot register node: this 
node's metadata serialization version %s " +

Review Comment:
   The recovery strategy here is to upgrade the joining node to a cassandra 
version that supports the required metadata serialization version, so usually 
you can think of it as 
    `Node Cassandra version >= minimum serialization version.`
   I felt this was reasonably implied by the error message, but I'm open to 
adding extra level details or hints if you feel it would helpful. What level of 
detail do you have in mind? 



-- 
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.

To unsubscribe, e-mail: [email protected]

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