ascherbakoff commented on code in PR #7052:
URL: https://github.com/apache/ignite-3/pull/7052#discussion_r2580547824


##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TransactionInflights.java:
##########
@@ -170,7 +170,25 @@ public void removeInflight(UUID txId) {
 
         // Avoid completion under lock.
         if (tuple != null) {
-            tuple.onInflightsRemoved();
+            tuple.onInflightsRemoved(tuple.err);
+        }
+    }
+
+    void removeInflight(UUID txId, Throwable cause) {
+        // Can be null if tx was aborted and inflights were removed from the 
collection.
+        TxContext tuple = txCtxMap.computeIfPresent(txId, (uuid, ctx) -> {
+            ctx.removeInflight(txId);
+
+            if (cause != null && ctx.err == null) {
+                ctx.err = cause; // Retain only first exception.

Review Comment:
   > Why not unify with overloaded method?
   
   I would leave it as is, because methods are called in different contexts.
   Firs is called on happy path and doesn't contain additional checks related 
to error processing.
   
   > we should get an exception from the tuple 
   
   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]

Reply via email to