denis-chudov commented on code in PR #3462:
URL: https://github.com/apache/ignite-3/pull/3462#discussion_r1534037288


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItTransactionRecoveryTest.java:
##########
@@ -187,6 +189,57 @@ public void testMultipleRecoveryRequestsIssued() throws 
Exception {
         }, 10_000));
     }
 
+    @Test
+    public void testRetryTransactionOperation() {
+        TableImpl tbl = (TableImpl) node(0).tables().table(TABLE_NAME);
+
+        var tblReplicationGrp = new TablePartitionId(tbl.tableId(), PART_ID);
+
+        String leaseholder = waitAndGetPrimaryReplica(node(0), 
tblReplicationGrp).getLeaseholder();
+
+        IgniteImpl leaseholderNode = findNodeByName(leaseholder);
+        IgniteImpl otherNode = null;
+
+        for (int i = 0; i < initialNodes(); i++) {
+            if (!leaseholder.equals(node(i).name())) {
+                otherNode = node(i);
+            }
+        }

Review Comment:
   You can use ItTransactionRecoveryTest#findNode



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java:
##########
@@ -265,15 +278,33 @@ public TableRaftServiceImpl tableRaftService() {
      * @param tx The transaction, not null if explicit.
      * @param fac Replica requests factory.
      * @param noWriteChecker Used to handle operations producing no updates.
-     * @param retryOnLockConflict {@code True} to retry on lock conflict.
+     * @return The future.
+     */
+    private <R> CompletableFuture<R> enlistInTx(
+            BinaryRowEx row,
+            @Nullable InternalTransaction tx,
+            IgniteTriFunction<InternalTransaction, ReplicationGroupId, Long, 
ReplicaRequest> fac,
+            BiPredicate<R, ReplicaRequest> noWriteChecker
+    ) {
+        return enlistInTx(row, tx, fac, noWriteChecker, null);
+    }
+
+    /**
+     * Enlists a single row into a transaction.
+     *
+     * @param row The row.
+     * @param tx The transaction, not null if explicit.
+     * @param fac Replica requests factory.
+     * @param noWriteChecker Used to handle operations producing no updates.
+     * @param txStartTs Transaction start time or {@code null}. This parameter 
is used only for retry.
      * @return The future.
      */
     private <R> CompletableFuture<R> enlistInTx(
             BinaryRowEx row,
             @Nullable InternalTransaction tx,
             IgniteTriFunction<InternalTransaction, ReplicationGroupId, Long, 
ReplicaRequest> fac,
             BiPredicate<R, ReplicaRequest> noWriteChecker,
-            boolean retryOnLockConflict
+            Long txStartTs

Review Comment:
   pls mark it as Nullable



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