JAkutenshi commented on code in PR #7196:
URL: https://github.com/apache/ignite-3/pull/7196#discussion_r2607385514


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItOperationRetryTest.java:
##########
@@ -104,8 +110,47 @@ public void testLockExceptionRetry() {
         assertEquals("new value", view.get(null, Tuple.create().set("key", 
1)).value("val"));
     }
 
-    private IgniteImpl findNodeByName(String leaseholder) {
-        return findNode(0, initialNodes(), n -> leaseholder.equals(n.name()));
+    @Test
+    public void retryImplicitTransactionsTest() throws InterruptedException {
+        IgniteImpl node0 = unwrapIgniteImpl(node(0));
+
+        ZonePartitionId partitionGroupId = extractPartitionGroupId(node0, 
ZONE_NAME, PART_ID);
+
+        String leaseholderNodeName = waitAndGetPrimaryReplica(node0, 
partitionGroupId).getLeaseholder();
+
+        IgniteImpl leaseholderNode = findNodeByName(leaseholderNodeName);
+
+        IgniteImpl transactionCoordinatorNode = 
findNonLeaseholderNode(leaseholderNode);
+
+        IgniteImpl futureLeaseholderNode = findNodeByFilter(n -> {
+            String nodeName = n.name();
+
+            return !(nodeName.equals(leaseholderNode.name()) || 
nodeName.equals(transactionCoordinatorNode.name()));
+        });
+
+        DefaultMessagingService messagingService = (DefaultMessagingService) 
leaseholderNode.clusterService().messagingService();
+        messagingService.dropMessages((nodeName, msg) -> msg instanceof 
PrimaryReplicaRequest);

Review Comment:
   Moreover `REPLICA_TIMEOUT_ERR` was missed.
   
   I'm not sure why and where I had to use the latch,  but I suppose implicit 
check that retry without lease transfer won't work due to the expected 
replication timeout and then try to do it asynchronously and do lease transfer. 
The last should succeed eventually.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to