You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "sanpwc (via GitHub)" <gi...@apache.org> on 2024/02/07 18:01:59 UTC

[PR] IGNITE-21317 Fix ItRebalanceDistributedTest [ignite-3]

sanpwc opened a new pull request, #3185:
URL: https://github.com/apache/ignite-3/pull/3185

   https://issues.apache.org/jira/browse/IGNITE-21317
   
   Table creation/Zone altering awaiting logic added.


-- 
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-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-21317 Fix ItRebalanceDistributedTest [ignite-3]

Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #3185:
URL: https://github.com/apache/ignite-3/pull/3185#discussion_r1483162933


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java:
##########
@@ -519,8 +516,6 @@ void testDestroyPartitionStoragesOnRestartEvictedNode(TestInfo testInfo) throws
 
         createTableWithOnePartition(node, TABLE_NAME, ZONE_NAME, 3, true);
 
-        waitPartitionAssignmentsSyncedToExpected(0, 3);

Review Comment:
   because createTableWithOnePartition includes waitPartitionAssignmentsSyncedToExpected
   ```
       private void createTableWithOnePartition(
               Node node,
               String tableName,
               String zoneName,
               int replicas,
               boolean testDataStorage
       ) throws Exception {
           createZone(node, zoneName, 1, replicas, testDataStorage);
   
           createTable(node, zoneName, tableName);
   
           waitPartitionAssignmentsSyncedToExpected(0, replicas);
   
           checkPartitionNodes(0, replicas);
       }
   ```



-- 
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-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-21317 Fix ItRebalanceDistributedTest [ignite-3]

Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc merged PR #3185:
URL: https://github.com/apache/ignite-3/pull/3185


-- 
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-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-21317 Fix ItRebalanceDistributedTest [ignite-3]

Posted by "sanpwc (via GitHub)" <gi...@apache.org>.
sanpwc commented on code in PR #3185:
URL: https://github.com/apache/ignite-3/pull/3185#discussion_r1483167167


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java:
##########
@@ -784,20 +780,23 @@ private void waitPartitionAssignmentsSyncedToExpected(int partNum, int replicasN
                 (long) AWAIT_TIMEOUT_MILLIS * nodes.size()
         ));
 
-        if (replicasNum == nodes.size()) {
-            assertTrue(waitForCondition(
-                    () -> {
-                        try {
-                            return ((TableImpl) nodes.get(0).tableManager.table(TABLE_NAME))
-                                    .internalTable().partitionRaftGroupService(partNum) != null;
-                        } catch (IgniteInternalException e) {
-                            // Raft group service not found.
-                            return false;
-                        }
-                    },
-                    (long) AWAIT_TIMEOUT_MILLIS * nodes.size()
-            ));
-        }
+        assertTrue(waitForCondition(
+                () -> {
+                    try {
+                        return nodes.stream().allMatch(n ->
+                                n.tableManager
+                                        .latestTables()
+                                        .get(getTableId(n, TABLE_NAME))
+                                        .internalTable()
+                                        .partitionRaftGroupService(0) != null

Review Comment:
   Yep, that should be partNum. Fixed.



-- 
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-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-21317 Fix ItRebalanceDistributedTest [ignite-3]

Posted by "kgusakov (via GitHub)" <gi...@apache.org>.
kgusakov commented on code in PR #3185:
URL: https://github.com/apache/ignite-3/pull/3185#discussion_r1483102352


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java:
##########
@@ -784,20 +780,23 @@ private void waitPartitionAssignmentsSyncedToExpected(int partNum, int replicasN
                 (long) AWAIT_TIMEOUT_MILLIS * nodes.size()
         ));
 
-        if (replicasNum == nodes.size()) {
-            assertTrue(waitForCondition(
-                    () -> {
-                        try {
-                            return ((TableImpl) nodes.get(0).tableManager.table(TABLE_NAME))
-                                    .internalTable().partitionRaftGroupService(partNum) != null;
-                        } catch (IgniteInternalException e) {
-                            // Raft group service not found.
-                            return false;
-                        }
-                    },
-                    (long) AWAIT_TIMEOUT_MILLIS * nodes.size()
-            ));
-        }
+        assertTrue(waitForCondition(
+                () -> {
+                    try {
+                        return nodes.stream().allMatch(n ->
+                                n.tableManager
+                                        .latestTables()
+                                        .get(getTableId(n, TABLE_NAME))
+                                        .internalTable()
+                                        .partitionRaftGroupService(0) != null

Review Comment:
   Why 0 and not partNum?



##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java:
##########
@@ -519,8 +516,6 @@ void testDestroyPartitionStoragesOnRestartEvictedNode(TestInfo testInfo) throws
 
         createTableWithOnePartition(node, TABLE_NAME, ZONE_NAME, 3, true);
 
-        waitPartitionAssignmentsSyncedToExpected(0, 3);

Review Comment:
   Why did you remove it?



-- 
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-unsubscribe@ignite.apache.org

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