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


##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TransactionInflights.java:
##########
@@ -251,6 +285,7 @@ ReadWriteTxContext lockTxForNewUpdates(UUID txId, 
Map<ReplicationGroupId, Pendin
 
     abstract static class TxContext {
         volatile long inflights = 0; // Updated under lock.
+        Throwable err;

Review Comment:
   I've moved counter after the error assignment:
   ```
   if (cause != null && ctx.err == null) {
                   ctx.err = cause; // Retain only first exception.
               }
   
   // Update inflight counter after assigning error value to avoid issues with 
visibility.
   ctx.removeInflight(txId);
   ```
   This should fix race condition issue.



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