You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "Cyrill (via GitHub)" <gi...@apache.org> on 2025/06/10 09:04:50 UTC

[PR] IGNITE-24818 Add tests to check lease time is present [ignite-3]

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

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


-- 
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-24818 Add tests to check lease time is present [ignite-3]

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


-- 
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-24818 Add tests to check lease time is present [ignite-3]

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


##########
modules/transactions/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoveryReconfigurationTest.java:
##########
@@ -1700,6 +1702,110 @@ void testGracefulRewritesChainAfterForceReset() throws Exception {
         assertAssignmentsChain(node0, partId, AssignmentsChain.of(finalAssignments));
     }
 
+    /**
+     * Lease agreement message should be the first message sent after reset.
+     */
+    @Test
+    @Disabled("https://issues.apache.org/jira/browse/IGNITE-25644")
+    @ZoneParams(nodes = 3, replicas = 3, partitions = 1)
+    void testLeaseResendOnManualReset() throws Exception {
+        int partId = 0;
+
+        IgniteImpl node0 = igniteImpl(0);
+        Table table = node0.tables().table(TABLE_NAME);
+
+        ReplicaMeta primaryBeforeReset = awaitPrimaryReplica(node0, partId);
+        logger().info("Primary replica before reset is {}", primaryBeforeReset);
+
+        assertRealAssignments(node0, partId, 0, 1, 2);
+
+        List<Throwable> errors = insertValues(table, partId, 0);
+        assertThat(errors, is(empty()));
+
+        stopNodesInParallel(1, 2);
+
+        AtomicBoolean thisMessageShouldBeLease = new AtomicBoolean(false);
+
+        blockMessage((nodeName, msg) -> {
+            logger().info("Received message {}", msg);
+
+            if (msg instanceof ActionResponse) {
+                return false;
+            }
+
+            if (thisMessageShouldBeLease.getAndSet(false) && !isLeaseMessage(msg)) {
+                // Not working at the moment.
+                logger().info("Lease message expected. Received " + msg + " instead");
+                fail("Lease message expected. Received " + msg + " instead");
+            }
+
+            if (isResetMessage(msg, partId)) {
+                // If this is a reset message then we need to check that the next message is a lease message.

Review Comment:
   Why do you think a lease grant message should be immediately next for the reset message?



-- 
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-24818 Add tests to check lease time is present [ignite-3]

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


##########
modules/transactions/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoveryReconfigurationTest.java:
##########
@@ -1700,6 +1702,110 @@ void testGracefulRewritesChainAfterForceReset() throws Exception {
         assertAssignmentsChain(node0, partId, AssignmentsChain.of(finalAssignments));
     }
 
+    /**
+     * Lease agreement message should be the first message sent after reset.
+     */
+    @Test
+    @Disabled("https://issues.apache.org/jira/browse/IGNITE-25644")
+    @ZoneParams(nodes = 3, replicas = 3, partitions = 1)
+    void testLeaseResendOnManualReset() throws Exception {
+        int partId = 0;
+
+        IgniteImpl node0 = igniteImpl(0);
+        Table table = node0.tables().table(TABLE_NAME);
+
+        ReplicaMeta primaryBeforeReset = awaitPrimaryReplica(node0, partId);
+        logger().info("Primary replica before reset is {}", primaryBeforeReset);
+
+        assertRealAssignments(node0, partId, 0, 1, 2);
+
+        List<Throwable> errors = insertValues(table, partId, 0);
+        assertThat(errors, is(empty()));
+
+        stopNodesInParallel(1, 2);
+
+        AtomicBoolean thisMessageShouldBeLease = new AtomicBoolean(false);
+
+        blockMessage((nodeName, msg) -> {
+            logger().info("Received message {}", msg);
+
+            if (msg instanceof ActionResponse) {
+                return false;
+            }
+
+            if (thisMessageShouldBeLease.getAndSet(false) && !isLeaseMessage(msg)) {
+                // Not working at the moment.
+                logger().info("Lease message expected. Received " + msg + " instead");
+                fail("Lease message expected. Received " + msg + " instead");
+            }
+
+            if (isResetMessage(msg, partId)) {
+                // If this is a reset message then we need to check that the next message is a lease message.

Review Comment:
   Changed that



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