denis-chudov commented on code in PR #7482:
URL: https://github.com/apache/ignite-3/pull/7482#discussion_r2741056569


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java:
##########
@@ -757,6 +757,8 @@ private static <T> CompletableFuture<T> postEnlist(
             }
 
             if (e != null) {
+                tx0.recordAbortReason(e);

Review Comment:
   I think there is a better way to handle this.
   We have weird methods like 
'ReadWriteTransactionImpl#rollbackTimeoutExceededAsync` and similar which 
assume that transaction may be finished either by the user or due to timeout. 
Obviously, it maybe aborted due to server exception but there is no applicable 
method.
   
   I would suggest to add method like `rollbackWithException`, unify it with 
rollbackTimeoutExceeded, which would also end up with dedicated 
`TxManagerImpl#finish` method and finish consistently with exception that is 
set to the meta.
   
   Also it would remove `recordExceptionInfo` separated from `tx#finish`.



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