You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2023/01/12 12:04:20 UTC

[GitHub] [ignite-3] vldpyatkov commented on a diff in pull request #1503: IGNITE-18324 Calling tx.rollback() or tx.commit() is not failed for committed transaction.

vldpyatkov commented on code in PR #1503:
URL: https://github.com/apache/ignite-3/pull/1503#discussion_r1068001360


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -959,14 +959,20 @@ private CompletableFuture<Void> processTxFinishAction(TxFinishReplicaRequest req
 
         request.groups().forEach(
                 (recipientNode, replicationGroupIds) ->
-                        cleanupFutures[cleanupFuturesCnt.getAndIncrement()] = changeStateFuture.thenCompose(ignored ->
-                                txManager.cleanup(
-                                        recipientNode,
-                                        replicationGroupIds,
-                                        txId,
-                                        commit,
-                                        request.commitTimestamp()
-                                )
+                        cleanupFutures[cleanupFuturesCnt.getAndIncrement()] =
+                                changeStateFuture.thenCompose(isStateChanged -> {
+                                    if ((Boolean) isStateChanged) {

Review Comment:
   Better explicitly declare return type than cast an object.



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org