alievmirza commented on code in PR #5468:
URL: https://github.com/apache/ignite-3/pull/5468#discussion_r2024898148


##########
modules/distribution-zones/src/integrationTest/java/org/apache/ignite/internal/distributionzones/ItDistributionZoneMetaStorageCompactionTest.java:
##########
@@ -130,6 +141,42 @@ public void testCompaction() throws InterruptedException {
         assertEquals(dataNodesBeforeNodeStop, dataNodes(ignite, zoneId, 
beforeNodesStop));
     }
 
+    @Test
+    public void testCompactionDuringRebalancing() throws InterruptedException {
+        sql("create zone " + ZONE_NAME + " with partitions=1, 
storage_profiles='" + DEFAULT_STORAGE_PROFILE + "'"
+                + ", data_nodes_auto_adjust_scale_down=0");
+        sql("create table " + TABLE_NAME + " (id int primary key) zone " + 
ZONE_NAME);
+        sql("insert into " + TABLE_NAME + " values (1)");
+        sql("alter zone " + ZONE_NAME + " set replicas=2");
+
+        IgniteImpl ignite = unwrapIgniteImpl(CLUSTER.node(0));
+
+        int zoneId = 
ignite.catalogManager().activeCatalog(ignite.clock().now().longValue()).zone(ZONE_NAME).id();
+        int tableId = 
ignite.catalogManager().activeCatalog(ignite.clock().now().longValue()).tables()
+                .stream()
+                .filter(t -> t.name().equals(TABLE_NAME))
+                .findFirst()
+                .orElseThrow()
+                .id();
+
+        MetaStorageManager metaStorageManager = ignite.metaStorageManager();
+
+        // Wait for the rebalancing to finish.
+        assertTrue(waitForCondition(() -> {

Review Comment:
   from my point of view, solution with checking tombstone is less stable as 
checking that stable is actually changed to expected one.
   
   Also, please remove `zoneId`, it is unused



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