nizhikov commented on code in PR #10314:
URL: https://github.com/apache/ignite/pull/10314#discussion_r1066085859


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java:
##########
@@ -1608,6 +1608,9 @@ public void commitTx(IgniteInternalTx tx) throws 
IgniteCheckedException {
                 ", tx=" + tx.getClass().getSimpleName() + ']');
         }
 
+        if (!cctx.kernalContext().clientNode())

Review Comment:
   Can we have something like following instead of invoke `onCommit` for every 
commit. 
   
   ```
       private volatile Consumer<IgniteInternalTx> commitCb;
   ...
       public void commitTx(IgniteInternalTx tx) throws IgniteCheckedException {
           ....
           Consumer<IgniteInternalTx> commitCb0 = commitCb;
           if (commitCb0 != null)
               commitCb0.accept(tx);
       }
   ```
   
   So `SnapshotManager` can set and clear callback when required.
   And all other time we enlarge tx commit to one volatile null check.



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