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


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java:
##########
@@ -509,7 +509,7 @@ private boolean finish(boolean commit,
                         + n.id()));
                 }
                 else {
-                    cctx.io().send(n, req, tx.ioPolicy());
+                    cctx.io().send(n, cctx.snapshotMgr().wrapMessage(req, 
tx.cutId()), tx.ioPolicy());

Review Comment:
   Can we implement some kind of plug in message wrapper inside of 
`GridCacheIoManager` ?
   ```
       private volatile Function<GridCacheMessage, GridCacheMessage> msgProc;
   
       public void send(ClusterNode node, GridCacheMessage msg, byte plc) 
throws IgniteCheckedException {
           assert !node.isLocal() : node;
           Function<GridCacheMessage, GridCacheMessage> msgProc0 = msgProc
           if (msgProc0 != null)
               msg = msgProc0.apply(msg); 
   ```
   
   It seems you can access current transaction with the ThreadLocal - 
`IgniteTxManager#threadCtx`.



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