Lalant commented on code in PR #7482:
URL: https://github.com/apache/ignite-3/pull/7482#discussion_r2797292881
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/IgniteAbstractTransactionImpl.java:
##########
@@ -164,4 +169,20 @@ public long getTimeout() {
public boolean isRolledBackWithTimeoutExceeded() {
return timeoutExceeded;
}
+
+ @Override
+ public CompletableFuture<Void> rollbackWithExceptionAsync(Throwable
throwable) {
+ return rollbackAsync().whenComplete((v, t) -> {
+ if (t != null) {
+ // If rollback fails we consider that there is coordinator
problem, but we keep original exception.
+ txManager.updateTxMeta(id,
+ old -> ofNullable(old)
+ .map(txStateMeta ->
txStateMeta.mutate().txState(TxState.ABANDONED)
+
.exceptionInfo(fromThrowable(throwable)).build())
+
.orElse(builder(TxState.ABANDONED).exceptionInfo(fromThrowable(throwable)).build()));
Review Comment:
Do you want to say that if state is null, we don't need to invent what state
to put inside, just skip update at all?
--
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]