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


##########
modules/runner/src/main/java/org/apache/ignite/internal/app/NodePropertiesImpl.java:
##########
@@ -67,16 +70,26 @@ private void detectAndSaveColocationStatusIfNeeded() {
         VaultEntry entry = vaultManager.get(ZONE_BASED_REPLICATION_KEY);
         if (entry != null) {
             colocationEnabled = entry.value()[0] == 1;
-
+            if (!colocationEnabled) {
+                throw new 
IgniteException(UNSUPPORTED_TABLE_BASED_REPLICATION_ERR, "Table based 
replication is no longer supported."
+                        + " Downgrade back to 3.1 and copy your data to a 
cluster of desired version.");
+            }
             logComment = "from Vault";
         } else {
             boolean freshNode = vaultManager.name() == null;
             if (freshNode) {
                 colocationEnabled = IgniteSystemProperties.colocationEnabled();
+                // TODO https://issues.apache.org/jira/browse/IGNITE-22522 
Remove.
+                // It's a temporary code that will be removed when !colocation 
mode will be fully dropped. That's the reason why instead of
+                // introducing new error code, existing somewhat related is 
used.
+                if (!colocationEnabled) {
+                    throw new IgniteException(ILLEGAL_ARGUMENT_ERR, "Table 
based replication is no longer supported, consider restarting"
+                            + " the node in zone based replication mode.");
+                }
                 logComment = "from system properties on a fresh node";
             } else {
-                colocationEnabled = false;
-                logComment = "node of an older version was run without zone 
based replication";
+                throw new 
IgniteException(UNSUPPORTED_TABLE_BASED_REPLICATION_ERR, "Table based 
replication is no longer supported."
+                        + " Downgrade back to 3.1 and copy your data to a 
cluster of desired version.");
             }
 
             saveToVault(colocationEnabled);

Review Comment:
   Yes and it's an intended behaviour.



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

Reply via email to