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


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java:
##########
@@ -3876,7 +3877,7 @@ else if (exchCtx.events().hasServerLeft())
             else if (forceAffReassignment)
                 msg.idealAffinityDiff(idealAffDiff);
 
-            msg.prepareMarshal(cctx);
+            
GridCacheMessageDeployer.deploy(cctx.kernalContext().messageFactory(), msg, 
cctx);

Review Comment:
   You're right twice here. The `deploy` call was doubly pointless: 
`GridDhtPartitionsFullMessage` has no generated deployer, and even if it had 
one — `GridCacheIoManager.onSend` deploys every cache message on the send path 
anyway. Replaced it with an eager `MessageMarshaller.marshal(...)`, restoring 
master's semantics: the heavy partition-map copy lands in the "Full message 
preparing" stage, and the instance cached in `FinishState` goes to late joiners 
pre-marshalled (the send-path marshal-once turns into a no-op, no race on the 
shared instance). On the rename 
(`copyLocalPartitions`/`deduplicatePartitionsIfNecessary`) — agreed it names 
the semantics better; as you say, a separate PR (the hooks' placement 
guarantees the unmarshal side runs via the generic receive pass, so the 
mechanism itself stays).



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java:
##########
@@ -23,22 +23,23 @@
 import java.util.Map;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.Compress;
+import org.apache.ignite.internal.MarshallableMessage;
 import org.apache.ignite.internal.Order;
 import org.apache.ignite.internal.managers.communication.ErrorMessage;
-import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.marshaller.Marshaller;
 import org.jetbrains.annotations.Nullable;
 
 /**
  * Information about partitions of a single node. <br>
  *
  * Sent in response to {@link GridDhtPartitionsSingleRequest} and during 
processing partitions exchange future.
  */
-public class GridDhtPartitionsSingleMessage extends 
GridDhtPartitionsAbstractMessage {
+public class GridDhtPartitionsSingleMessage extends 
GridDhtPartitionsAbstractMessage implements MarshallableMessage {

Review Comment:
   Here no call change is needed: `GridDhtPartitionsSingleMessage` is sent once 
to the coordinator, so the send-path marshal covers it — there's no 
cached-instance / staging concern like in the full message. The "it's not 
really marshalling" point is the same rename topic — separate PR.



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