Cyrill commented on code in PR #2856:
URL: https://github.com/apache/ignite-3/pull/2856#discussion_r1430460769
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TxManagerImpl.java:
##########
@@ -439,20 +472,26 @@ private CompletableFuture<Void> durableFinish(
if (ex != null) {
Throwable cause = ExceptionUtils.unwrapCause(ex);
- if (cause instanceof TransactionException) {
- TransactionException transactionException =
(TransactionException) cause;
+ if (cause instanceof
TransactionAlreadyFinishedException) {
+ TransactionAlreadyFinishedException
transactionException = (TransactionAlreadyFinishedException) cause;
+
+ TransactionResult result =
transactionException.transactionResult();
- if (transactionException.code() ==
TX_WAS_ABORTED_ERR) {
- updateTxMeta(txId, old -> {
- TxStateMeta txStateMeta = new
TxStateMeta(ABORTED, old.txCoordinatorId(), commitPartition, null);
+ updateTxMeta(txId, old -> {
+ TxStateMeta txStateMeta =
+ new TxStateMeta(
+ result.transactionState(),
+ old.txCoordinatorId(),
+ commitPartition,
+ result.commitTimestamp()
+ );
- txFinishFuture.complete(txStateMeta);
+ txFinishFuture.complete(txStateMeta);
Review Comment:
done
--
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]