PakhomovAlexander commented on code in PR #5209:
URL: https://github.com/apache/ignite-3/pull/5209#discussion_r1975303673
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/ReadWriteTransactionImpl.java:
##########
@@ -150,26 +150,39 @@ private void checkEnlistPossibility() {
@Override
public CompletableFuture<Void> commitAsync() {
return TransactionsExceptionMapperUtil.convertToPublicFuture(
- finish(true, null, false),
+ finish(true, null, false, false),
TX_COMMIT_ERR
);
}
@Override
public CompletableFuture<Void> rollbackAsync() {
return TransactionsExceptionMapperUtil.convertToPublicFuture(
- finish(false, null, false),
+ finish(false, null, false, false),
TX_ROLLBACK_ERR
);
}
@Override
- public CompletableFuture<Void> finish(boolean commit, @Nullable
HybridTimestamp executionTimestamp, boolean full) {
+ public CompletableFuture<Void> rollbackTimeoutExceededAsync() {
+ return TransactionsExceptionMapperUtil.convertToPublicFuture(
+ finish(false, null, false, true)
+ .thenAccept(unused -> timeoutExceeded = true),
+ TX_ROLLBACK_ERR
+ ).thenAccept(unused -> this.timeoutExceeded = true);
Review Comment:
good catch!
--
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]