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


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -516,13 +522,32 @@ private CompletableFuture<Void> 
processTxRecoveryAction(TxRecoveryMessage reques
         boolean transactionAlreadyFinished = txMeta != null && 
isFinalState(txMeta.txState());
 
         if (transactionAlreadyFinished) {
-            return nullCompletedFuture();
+            if (txMeta.locksReleased()) {
+                // Locks released - nothing to do.
+                return nullCompletedFuture();
+            }
+            // Locks were not released - send cleanup.
+            if (txMeta.enlistedPartitions().isEmpty()) {

Review Comment:
   by the way, if you call `txManager.finish` like below, you will never get 
empty list here: even in case of recovery you will send a tx finish request to 
commit partition with one partition in `enlistedPartitions` collection - the 
commit partition itself.



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