anton-vinogradov commented on code in PR #13095:
URL: https://github.com/apache/ignite/pull/13095#discussion_r3588849904


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java:
##########
@@ -430,12 +432,21 @@ public IgniteInternalFuture<GridNearTxPrepareResponse> 
prepareNearTxLocal(
         IgniteTxEntry firstEntry;
 
         try {
-            IgniteTxEntry firstWrite = unmarshal(req.writes());
-            IgniteTxEntry firstRead = unmarshal(req.reads());
+            IgniteTxEntry firstWrite = initialize(req.writes(), 
req.topologyVersion());
+            IgniteTxEntry firstRead = initialize(req.reads(), 
req.topologyVersion());
 
             firstEntry = firstWrite != null ? firstWrite : firstRead;
         }
         catch (IgniteCheckedException e) {
+            try {
+                req.onClassError(e);

Review Comment:
   You're right — and thanks for the breakpoint check, it exposed that my 
earlier justification was wrong. Those tests inject class-loading errors, which 
are caught earlier in `GridCacheIoManager.unmarshall` (`onClassError` → 
`processFailedMessage`) before the message ever reaches `prepareNearTx`, so the 
block was never on their path.
   
   Digging further, the block is redundant anyway: master handled the residual 
failure here (`initialize` → `initializeContext` throwing 
`CacheInvalidStateException` when a cache is stopped mid-prepare) with the 
plain `return new GridFinishedFuture<>(e)` — the future's error is delivered to 
the near node by its listener. My extra `processFailedMessage` would actually 
send a *second* response. Reverted the catch to master's form. Verified: all 
four `IgniteCacheP2pUnmarshalling*ErrorTest` (4/4) plus a cache-stop / tx 
battery (`IgniteCacheDynamicStopSelfTest`, `GridCacheStopSelfTest`, 
`IgniteTxExceptionNodeFailTest`, `TxDeadlockDetectionMessageMarshallingTest`) 
green with the simplified catch.



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