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


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -1227,9 +1311,30 @@ private CompletableFuture<Void> finishAndCleanup(
     ) {
         CompletableFuture<?> changeStateFuture = 
finishTransaction(enlistedPartitions, txId, commit, commitTimestamp, 
txCoordinatorId);
 
+        return cleanup(changeStateFuture, enlistedPartitions, commit, 
commitTimestamp, txId, ATTEMPTS_TO_CLEANUP_REPLICA)
+                .thenRun(() -> markLocksReleased(
+                        txId,
+                        enlistedPartitions,
+                        commit ? COMMITED : ABORTED,
+                        commitTimestamp)
+                );
+    }
+
+    private CompletableFuture<Void> cleanup(UUID txId, TxMeta txMeta) {
+        return cleanup(completedFuture(null), txMeta.enlistedPartitions(), 
txMeta.txState() == COMMITED, txMeta.commitTimestamp(), txId, 1);

Review Comment:
   This is limited because it is triggered from commit partition, and can be 
retried from there if needed. There is a cleanup with retry with also limited 
count of attempts (see `ATTEMPTS_TO_CLEANUP_REPLICA`), but we agreed to remove 
the limit, we will need separate ticket for this.



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