You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by rp...@apache.org on 2025/05/02 09:40:20 UTC

(ignite-3) branch main updated: IGNITE-25259 Fix ItCmgDisasterRecoveryTest in colocation mode (#5737)

This is an automated email from the ASF dual-hosted git repository.

rpuch pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 50fcfaa33eb IGNITE-25259 Fix ItCmgDisasterRecoveryTest in colocation mode (#5737)
50fcfaa33eb is described below

commit 50fcfaa33eb5663d5dae4ffa8492b2e7f8227688
Author: Roman Puchkovskiy <ro...@gmail.com>
AuthorDate: Fri May 2 13:40:15 2025 +0400

    IGNITE-25259 Fix ItCmgDisasterRecoveryTest in colocation mode (#5737)
---
 .../disaster/system/ItCmgDisasterRecoveryTest.java | 25 ++++++++++++----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/modules/system-disaster-recovery/src/integrationTest/java/org/apache/ignite/internal/disaster/system/ItCmgDisasterRecoveryTest.java b/modules/system-disaster-recovery/src/integrationTest/java/org/apache/ignite/internal/disaster/system/ItCmgDisasterRecoveryTest.java
index 65628dcd439..b1c5dddc03e 100644
--- a/modules/system-disaster-recovery/src/integrationTest/java/org/apache/ignite/internal/disaster/system/ItCmgDisasterRecoveryTest.java
+++ b/modules/system-disaster-recovery/src/integrationTest/java/org/apache/ignite/internal/disaster/system/ItCmgDisasterRecoveryTest.java
@@ -284,7 +284,7 @@ class ItCmgDisasterRecoveryTest extends ItSystemGroupDisasterRecoveryTest {
                         + " (AUTO SCALE UP 0, AUTO SCALE DOWN 0) STORAGE PROFILES ['default']"
         );
 
-        int zoneId = igniteImpl(1).catalogManager().activeCatalog(Long.MAX_VALUE).zone("TEST_ZONE").id();
+        int zoneId = igniteImpl(1).catalogManager().activeCatalog(Long.MAX_VALUE).zone(zoneName).id();
 
         waitTillDataNodesBecome(new int[]{0, 1}, zoneId, igniteImpl(1));
 
@@ -321,21 +321,24 @@ class ItCmgDisasterRecoveryTest extends ItSystemGroupDisasterRecoveryTest {
     private void waitTillDataNodesBecome(int[] expectedDataNodeIndexes, int zoneId, IgniteImpl ignite) throws InterruptedException {
         int catalogVersion = ignite.catalogManager().latestCatalogVersion();
 
-        assertTrue(
-                waitForCondition(
-                        () -> currentDataNodes(ignite, catalogVersion, zoneId).equals(Set.of(nodeNames(expectedDataNodeIndexes))),
-                        SECONDS.toMillis(10)
-                ),
-                "Did not see data nodes to become " + IntStream.of(expectedDataNodeIndexes).boxed().collect(toList()) + " in time"
+        // TODO: https://issues.apache.org/jira/browse/IGNITE-25277 - without colocation, 10 seconds are enough, but with
+        // colocation, we have to wait longer. After this is sorted out, reduce the timeout back to 10 seconds.
+        waitForCondition(
+                () -> currentDataNodes(ignite, catalogVersion, zoneId).equals(Set.of(nodeNames(expectedDataNodeIndexes))),
+                SECONDS.toMillis(30)
+        );
+
+        Set<String> dataNodes = currentDataNodes(ignite, catalogVersion, zoneId);
+        assertThat(
+                "Did not see data nodes to become " + IntStream.of(expectedDataNodeIndexes).boxed().collect(toList()) + " in time",
+                dataNodes,
+                is(Set.of(nodeNames(expectedDataNodeIndexes)))
         );
     }
 
     private static Set<String> currentDataNodes(IgniteImpl ignite, int catalogVersion, int zoneId) {
-        long currentRevision = ignite.metaStorageManager().appliedRevision();
-        HybridTimestamp timestamp = ignite.metaStorageManager().timestampByRevisionLocally(currentRevision);
-
         CompletableFuture<Set<String>> dataNodesFuture = ignite.distributionZoneManager()
-                .dataNodes(timestamp, catalogVersion, zoneId);
+                .dataNodes(HybridTimestamp.MAX_VALUE, catalogVersion, zoneId);
 
         assertThat(dataNodesFuture, willCompleteSuccessfully());
         return dataNodesFuture.join();