[ 
https://issues.apache.org/jira/browse/IGNITE-28938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anton Vinogradov updated IGNITE-28938:
--------------------------------------
    Labels: IEP-132  (was: )

> Split MarshallableMessage: callback before send vs marshalling
> --------------------------------------------------------------
>
>                 Key: IGNITE-28938
>                 URL: https://issues.apache.org/jira/browse/IGNITE-28938
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: messaging
>            Reporter: Anton Vinogradov
>            Assignee: Anton Vinogradov
>            Priority: Major
>              Labels: IEP-132
>             Fix For: 2.19
>
>
> *No wire format change.*
> h3. Goal
> Do not give a marshaller to messages that only need a callback before send.
> h3. Why
> {{MarshallableMessage}} is used for two different things. 12 of its 21 
> implementations really use the marshaller. The other 8 use neither the 
> marshaller nor the class loader - they only change their own fields:
> * {{CacheContinuousQueryEntry}} - clears data;
> * {{GridCacheEntryInfo}} - recalculates TTL;
> * {{GridDhtPartitionsFullMessage}} and {{GridDhtPartitionsSingleMessage}} - 
> copy and zip partition maps;
> * {{GridNearTxPrepareRequest}} - sets an expiry policy flag;
> * {{ColocationGroup}} - packs bits;
> * {{CompressedMessage}} and {{GridH2ValueMessage}}.
> All 8 still get a {{Marshaller}} field in the generated companion.
> h3. How
> * add a new interface for the callback, with no marshaller and no class 
> loader;
> * move these 8 classes to it, so the generator calls the callback instead of 
> {{msg.marshal(marshaller)}};
> * keep {{MarshallableMessage}} for the other 12.
> h3. Expected result
> The type now shows if a class needs a marshaller. 8 companions lose the 
> field. {{GridTestUtils#loadMarshaller}} becomes correct again: it picks a 
> constructor by {{instanceof MarshallableMessage}}, while the generator uses 
> {{marshallable || hasMarshalled}}.
> h3. How to verify
> Full build and the message tests. Generated code of these 8 classes must stay 
> the same, except the removed field.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to