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


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/handlers/TxFinishReplicaRequestHandler.java:
##########
@@ -224,12 +224,22 @@ private CompletableFuture<TransactionResult> 
finishAndCleanup(
                 .map(entry -> new EnlistedPartitionGroup(entry.getKey(), 
entry.getValue().tableIds()))
                 .collect(toList());
         return finishTransaction(enlistedPartitionGroups, txId, commit, 
commitTimestamp)
-                .thenCompose(txResult -> {
+                .thenApply(txResult -> {
                     boolean actualCommit = txResult.transactionState() == 
COMMITTED;
                     HybridTimestamp actualCommitTs = 
txResult.commitTimestamp();
 
-                    return txManager.cleanup(replicationGroupId, 
enlistedPartitions, actualCommit, actualCommitTs, txId)
-                            .thenApply(v -> txResult);
+                    try {
+                        txManager.cleanup(replicationGroupId, 
enlistedPartitions, actualCommit, actualCommitTs, txId)

Review Comment:
   We now do `releaseTxLocks` asynchronously, so another transaction may 
stumble into locks of previous one that is already finished. Is it correct 
behavior? Should it be documented?



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