sanpwc commented on code in PR #6089:
URL: https://github.com/apache/ignite-3/pull/6089#discussion_r2159999793


##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/raft/ValidationManager.java:
##########
@@ -112,13 +113,28 @@ protected ValidationResult validateNode(
                     "Cluster tags do not match. Cluster tag: %s, cluster tag 
stored in CMG: %s",
                     clusterTag, state.clusterTag()
             ));
+        } else if (!isColocationEnabledMatched(isColocationEnabled(node))) {
+            return ValidationResult.errorResult(String.format(
+                    "Colocation enabled mode does not match. Joining node 
colocation mode is: %s, cluster colocation mode is: %s",
+                    isColocationEnabled(node),
+                    
isColocationEnabled(logicalTopology.getLogicalTopology().nodes().iterator().next())
+            ));
         } else {
             putValidatedNode(node);
 
             return ValidationResult.successfulResult();
         }
     }
 
+    private static boolean isColocationEnabled(LogicalNode node) {
+        return 
Boolean.parseBoolean(node.systemAttributes().get(COLOCATION_FEATURE_FLAG));
+    }
+
+    private boolean isColocationEnabledMatched(boolean 
joiningNodeColocationEnabled) {
+        return logicalTopology.getLogicalTopology().nodes().isEmpty()

Review Comment:
   Done.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to