You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "kgusakov (via GitHub)" <gi...@apache.org> on 2025/01/17 01:08:42 UTC

[PR] IGNITE-24137 Added tests for filters and storage profiles awareness on partition reset [ignite-3]

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

   https://issues.apache.org/jira/browse/IGNITE-24209


-- 
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-24209 Added tests for filters and storage profiles awareness on partition reset [ignite-3]

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


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/AbstractHighAvailablePartitionsRecoveryTest.java:
##########
@@ -132,10 +142,87 @@ private void waitAndAssertStableAssignmentsOfPartitionEqualTo(
                 .collect(Collectors.toUnmodifiableSet()));
     }
 
+    /**
+     * Wait for the 2 facts simultaneously.
+     *
+     * <ul>
+     *     <li>All planned rebalances have finished (pending and planned keys is empty).</li>
+     *     <li>Stable assignments is equal to expected</li>
+     * </ul>
+     *
+     * @param gatewayNode Node for communication with cluster and components.
+     * @param tableName Table name.
+     * @param partitionIds Set of target partition ids to check.
+     * @param nodes Expected set of nodes in stable assignments.
+     */
+    final void waitThatAllRebalancesHaveFinishedAndStableAssignmentsEqualsToExpected(
+            IgniteImpl gatewayNode, String tableName, Set<Integer> partitionIds, Set<String> nodes) {
+        partitionIds.forEach(p -> {
+            try {
+                waitThatAllRebalancesHaveFinishedAndStableAssignmentsEqualsToExpected(gatewayNode, tableName, p, nodes);
+            } catch (InterruptedException e) {
+                throw new RuntimeException(e);
+            }
+        });
+    }
+
+    /**
+     * The same as the previous one, but for concrete partition.

Review Comment:
   Let's put link to the original method



-- 
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-24209 Added tests for filters and storage profiles awareness on partition reset [ignite-3]

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


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/AbstractHighAvailablePartitionsRecoveryTest.java:
##########
@@ -132,10 +142,71 @@ private void waitAndAssertStableAssignmentsOfPartitionEqualTo(
                 .collect(Collectors.toUnmodifiableSet()));
     }
 
+    final void waitAndAssertEmptyRebalanceKeysAndStableAssignmentsOfPartitionEqualTo(

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

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


Re: [PR] IGNITE-24209 Added tests for filters and storage profiles awareness on partition reset [ignite-3]

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


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/AbstractHighAvailablePartitionsRecoveryTest.java:
##########
@@ -132,10 +142,87 @@ private void waitAndAssertStableAssignmentsOfPartitionEqualTo(
                 .collect(Collectors.toUnmodifiableSet()));
     }
 
+    /**
+     * Wait for the 2 facts simultaneously.
+     *
+     * <ul>
+     *     <li>All planned rebalances have finished (pending and planned keys is empty).</li>
+     *     <li>Stable assignments is equal to expected</li>
+     * </ul>
+     *
+     * @param gatewayNode Node for communication with cluster and components.
+     * @param tableName Table name.
+     * @param partitionIds Set of target partition ids to check.
+     * @param nodes Expected set of nodes in stable assignments.
+     */
+    final void waitThatAllRebalancesHaveFinishedAndStableAssignmentsEqualsToExpected(
+            IgniteImpl gatewayNode, String tableName, Set<Integer> partitionIds, Set<String> nodes) {
+        partitionIds.forEach(p -> {
+            try {
+                waitThatAllRebalancesHaveFinishedAndStableAssignmentsEqualsToExpected(gatewayNode, tableName, p, nodes);
+            } catch (InterruptedException e) {
+                throw new RuntimeException(e);
+            }
+        });
+    }
+
+    /**
+     * The same as the previous one, but for concrete partition.

Review Comment:
   I can't ( The link is + ** is longer than 144 symbols. I tried when was making these changes) 
   <img width="1559" alt="Screenshot 2025-01-23 at 16 45 42" src="https://github.com/user-attachments/assets/bbf2155c-0245-412c-bf60-e7899574afab" />
   



-- 
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-24209 Added tests for filters and storage profiles awareness on partition reset [ignite-3]

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


-- 
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-24209 Added tests for filters and storage profiles awareness on partition reset [ignite-3]

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


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/AbstractHighAvailablePartitionsRecoveryTest.java:
##########
@@ -132,10 +142,87 @@ private void waitAndAssertStableAssignmentsOfPartitionEqualTo(
                 .collect(Collectors.toUnmodifiableSet()));
     }
 
+    /**
+     * Wait for the 2 facts simultaneously.
+     *
+     * <ul>
+     *     <li>All planned rebalances have finished (pending and planned keys is empty).</li>
+     *     <li>Stable assignments is equal to expected</li>
+     * </ul>
+     *
+     * @param gatewayNode Node for communication with cluster and components.
+     * @param tableName Table name.
+     * @param partitionIds Set of target partition ids to check.
+     * @param nodes Expected set of nodes in stable assignments.
+     */
+    final void waitThatAllRebalancesHaveFinishedAndStableAssignmentsEqualsToExpected(
+            IgniteImpl gatewayNode, String tableName, Set<Integer> partitionIds, Set<String> nodes) {
+        partitionIds.forEach(p -> {
+            try {
+                waitThatAllRebalancesHaveFinishedAndStableAssignmentsEqualsToExpected(gatewayNode, tableName, p, nodes);
+            } catch (InterruptedException e) {
+                throw new RuntimeException(e);
+            }
+        });
+    }
+
+    /**
+     * The same as the previous one, but for concrete partition.

Review Comment:
   Check this solution pls https://github.com/apache/ignite-3/pull/5064/commits/5ae9304e28d380241f78e8d330bc26a73e91d1dd



-- 
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-24209 Added tests for filters and storage profiles awareness on partition reset [ignite-3]

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


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/AbstractHighAvailablePartitionsRecoveryTest.java:
##########
@@ -132,10 +142,71 @@ private void waitAndAssertStableAssignmentsOfPartitionEqualTo(
                 .collect(Collectors.toUnmodifiableSet()));
     }
 
+    final void waitAndAssertEmptyRebalanceKeysAndStableAssignmentsOfPartitionEqualTo(

Review Comment:
   The name of the method is a bit ambiguous, it could be understood that stable is also must be null. Please improve naming and a javadoc explaining what do we assert in this method  



-- 
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-24209 Added tests for filters and storage profiles awareness on partition reset [ignite-3]

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


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/distributed/disaster/AbstractHighAvailablePartitionsRecoveryTest.java:
##########
@@ -132,10 +142,87 @@ private void waitAndAssertStableAssignmentsOfPartitionEqualTo(
                 .collect(Collectors.toUnmodifiableSet()));
     }
 
+    /**
+     * Wait for the 2 facts simultaneously.
+     *
+     * <ul>
+     *     <li>All planned rebalances have finished (pending and planned keys is empty).</li>
+     *     <li>Stable assignments is equal to expected</li>
+     * </ul>
+     *
+     * @param gatewayNode Node for communication with cluster and components.
+     * @param tableName Table name.
+     * @param partitionIds Set of target partition ids to check.
+     * @param nodes Expected set of nodes in stable assignments.
+     */
+    final void waitThatAllRebalancesHaveFinishedAndStableAssignmentsEqualsToExpected(
+            IgniteImpl gatewayNode, String tableName, Set<Integer> partitionIds, Set<String> nodes) {
+        partitionIds.forEach(p -> {
+            try {
+                waitThatAllRebalancesHaveFinishedAndStableAssignmentsEqualsToExpected(gatewayNode, tableName, p, nodes);
+            } catch (InterruptedException e) {
+                throw new RuntimeException(e);
+            }
+        });
+    }
+
+    /**
+     * The same as the previous one, but for concrete partition.

Review Comment:
   I can't ( The link + ** is longer than 144 symbols. I tried when was making these changes) 
   <img width="1559" alt="Screenshot 2025-01-23 at 16 45 42" src="https://github.com/user-attachments/assets/bbf2155c-0245-412c-bf60-e7899574afab" />
   



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