Cyrill commented on code in PR #7899:
URL: https://github.com/apache/ignite-3/pull/7899#discussion_r3010836543


##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TxRecoveryEngine.java:
##########
@@ -127,10 +129,24 @@ public CompletableFuture<TransactionMeta> 
triggerTxRecovery(
                 })
                 .thenCompose(Function.identity())
                 .whenComplete((v, ex) -> {
-                    runCleanupOnNode(commitPartitionId, txId, 
commitPartitionNode);
+                    // v contains the actual resolved transaction state 
(COMMITTED or ABORTED).
+                    // We must pass it to cleanup so the correct commit flag 
is used.
+                    // Previously, runCleanupOnNode always used commit=false 
(hardcoded in the 3-param
+                    // TxCleanupRequestSender.cleanup), which caused data 
corruption when the transaction
+                    // was actually COMMITTED: the abort cleanup would race 
with the legitimate commit
+                    // cleanup, and whichever arrived first at each partition 
would win, producing a mix
+                    // of committed and aborted rows within the same 
transaction.

Review Comment:
   fixed



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