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


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java:
##########
@@ -932,13 +934,8 @@ protected CacheEntryEventFilter getEventFilter0() {
      */
     private void prepareEntry(GridCacheContext cctx, UUID nodeId, 
CacheContinuousQueryEntry entry)
         throws IgniteCheckedException {
-        if (cctx.kernalContext().config().isPeerClassLoadingEnabled() && 
cctx.discovery().node(nodeId) != null) {

Review Comment:
   Marshalling isn't removed — it moved to the send path: the entry travels in 
`GridContinuousMessage.msgs`, and the generated 
`GridContinuousMessageMarshaller` recursively marshals every entry on send (the 
entry resolves its `CacheObjectContext` via `CacheIdAware` from its `cacheId`). 
`prepareEntry` keeps only the p2p `deploy().prepare(entry)` part.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java:
##########
@@ -1076,7 +1073,7 @@ private void notifyCallback0(UUID nodeId,
                     }
                 }
 
-                e.unmarshal(cctx, ldr);
+                MessageMarshaller.unmarshal(ctx.messageFactory(), e, ctx, 
coctx, depMgr.globalLoader());

Review Comment:
   The call itself is master's (`e.unmarshal(cctx, ldr)` sat at this very spot) 
— we only gave it the proper context/loader. It can't do the work twice: the 
generic receive pass and this cache-aware pass split the work through guards — 
companion bytes are nulled right after the first decode, and 
`CacheObject.unmarshal` is idempotent (`val == null` guard). The two-pass shape 
is also enforced by the test-wide `MessageUnmarshalDedup` checker (asserts on 
any same-pass repeat); `CacheContinuousQueryOperationP2PTest` runs 9/9 green 
with the checker on.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java:
##########
@@ -418,11 +418,11 @@ public void onEntryUpdated(
                     oldVal = (CacheObject)cctx.unwrapTemporary(oldVal);
 
                     if (oldVal != null)
-                        oldVal.finishUnmarshal(cctx.cacheObjectContext(), 
cctx.deploy().globalLoader());
+                        oldVal.unmarshal(cctx.cacheObjectContext(), 
cctx.deploy().globalLoader());

Review Comment:
   It cannot — this is the same method master had, just renamed 
(`finishUnmarshal` → `unmarshal`, body unchanged): the `val == null` guard 
makes a repeated call a no-op, exactly as on master.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java:
##########
@@ -418,11 +418,11 @@ public void onEntryUpdated(
                     oldVal = (CacheObject)cctx.unwrapTemporary(oldVal);
 
                     if (oldVal != null)
-                        oldVal.finishUnmarshal(cctx.cacheObjectContext(), 
cctx.deploy().globalLoader());
+                        oldVal.unmarshal(cctx.cacheObjectContext(), 
cctx.deploy().globalLoader());
                 }
 
                 if (newVal != null)
-                    newVal.finishUnmarshal(cctx.cacheObjectContext(), 
cctx.deploy().globalLoader());
+                    newVal.unmarshal(cctx.cacheObjectContext(), 
cctx.deploy().globalLoader());

Review Comment:
   Same — see above.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java:
##########
@@ -484,7 +484,7 @@ public void onEntryExpired(GridCacheEntryEx e, 
KeyCacheObject key, CacheObject o
                         oldVal = (CacheObject)cctx.unwrapTemporary(oldVal);
 
                     if (oldVal != null)
-                        oldVal.finishUnmarshal(cctx.cacheObjectContext(), 
cctx.deploy().globalLoader());
+                        oldVal.unmarshal(cctx.cacheObjectContext(), 
cctx.deploy().globalLoader());

Review Comment:
   Same — see above.



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