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

Anton Vinogradov updated IGNITE-28936:
--------------------------------------
    Description: 
*Wire format change. Do this before 2.19 is released - after that it would 
break rolling upgrade.*

h3. Goal

Delete code that can never run, and fields that are always empty.

h3. Why

{{GridDhtAtomicUpdateRequest#forceTransformBackups}} is always {{false}}. Both 
places that create this message pass {{false}}: {{GridDhtAtomicUpdateFuture}} 
and {{GridDhtAtomicSingleUpdateFuture}}. All code under this flag is dead. 
Entry processors are never added, so the hand-written {{marshal}} and 
{{unmarshal}} have nothing to write, and three collection fields are always 
{{null}}.

h3. How

* delete {{entryProcessors}}, {{nearEntryProcessors}} and {{invokeArgs}};
* delete the wire fields {{@Order(12) entryProcessorsBytes}}, {{@Order(13) 
nearEntryProcessorsBytes}}, {{@Order(14) invokeArgsBytes}};
* delete {{@Order(11) forceTransformBackups}} and the constructor parameter, 
and update both callers;
* delete {{marshal(Marshaller)}}, {{unmarshal(Marshaller, ClassLoader)}}, the 
{{MarshallableMessage}} interface and {{@UseBinaryMarshaller}};
* renumber the remaining {{@Order}} values.

h3. Expected result

Every DHT atomic update request sends 4 fields less: one boolean and three 
empty collections. The class does not need a marshaller any more.

h3. How to verify

Atomic cache tests, including {{EntryProcessor}} and near cache updates. Full 
build with {{-Pcheckstyle}}.

  was:
h3. Goal

Delete unreachable marshalling machinery and the wire fields that always travel 
empty.

h3. Why

{{GridDhtAtomicUpdateRequest#forceTransformBackups}} is passed {{false}} from 
both places that create the message - {{GridDhtAtomicUpdateFuture}} and 
{{GridDhtAtomicSingleUpdateFuture}}. Every branch guarded by that flag is 
therefore dead: entry processors are never collected, so the hand-written 
{{marshal}}/{{unmarshal}} never has anything to write, and three collection 
fields always stay {{null}} on the wire.

h3. How

* drop the transient {{entryProcessors}}, {{nearEntryProcessors}}, 
{{invokeArgs}} and the wire fields {{@Order(12) entryProcessorsBytes}}, 
{{@Order(13) nearEntryProcessorsBytes}}, {{@Order(14) invokeArgsBytes}};
* drop {{@Order(11) forceTransformBackups}} together with the constructor 
parameter, simplifying both call sites;
* drop the hand-written {{marshal(Marshaller)}} / {{unmarshal(Marshaller, 
ClassLoader)}}, the {{MarshallableMessage}} interface and 
{{@UseBinaryMarshaller}} on the class;
* renumber the remaining {{@Order}} fields.

h3. Expected result

One boolean and three always-null collection fields disappear from every DHT 
atomic update request. The class stops being marshallable at all, so it no 
longer needs a marshaller or a mark, and one of the 11 meaningful annotations 
is gone.

h3. How to verify

Atomic cache suites including {{EntryProcessor}}/transform paths and near-cache 
updates; full build with {{-Pcheckstyle}}.

         Labels: compatibility  (was: )

> Remove dead marshalling code from GridDhtAtomicUpdateRequest
> ------------------------------------------------------------
>
>                 Key: IGNITE-28936
>                 URL: https://issues.apache.org/jira/browse/IGNITE-28936
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: messaging
>            Reporter: Anton Vinogradov
>            Assignee: Anton Vinogradov
>            Priority: Major
>              Labels: compatibility
>             Fix For: 2.19
>
>
> *Wire format change. Do this before 2.19 is released - after that it would 
> break rolling upgrade.*
> h3. Goal
> Delete code that can never run, and fields that are always empty.
> h3. Why
> {{GridDhtAtomicUpdateRequest#forceTransformBackups}} is always {{false}}. 
> Both places that create this message pass {{false}}: 
> {{GridDhtAtomicUpdateFuture}} and {{GridDhtAtomicSingleUpdateFuture}}. All 
> code under this flag is dead. Entry processors are never added, so the 
> hand-written {{marshal}} and {{unmarshal}} have nothing to write, and three 
> collection fields are always {{null}}.
> h3. How
> * delete {{entryProcessors}}, {{nearEntryProcessors}} and {{invokeArgs}};
> * delete the wire fields {{@Order(12) entryProcessorsBytes}}, {{@Order(13) 
> nearEntryProcessorsBytes}}, {{@Order(14) invokeArgsBytes}};
> * delete {{@Order(11) forceTransformBackups}} and the constructor parameter, 
> and update both callers;
> * delete {{marshal(Marshaller)}}, {{unmarshal(Marshaller, ClassLoader)}}, the 
> {{MarshallableMessage}} interface and {{@UseBinaryMarshaller}};
> * renumber the remaining {{@Order}} values.
> h3. Expected result
> Every DHT atomic update request sends 4 fields less: one boolean and three 
> empty collections. The class does not need a marshaller any more.
> h3. How to verify
> Atomic cache tests, including {{EntryProcessor}} and near cache updates. Full 
> build with {{-Pcheckstyle}}.



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

Reply via email to