anton-vinogradov commented on code in PR #13408:
URL: https://github.com/apache/ignite/pull/13408#discussion_r3683125548
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicFullUpdateRequest.java:
##########
@@ -387,7 +379,7 @@ else if (conflictVers != null)
forceDeploymentInfo(ctx);
- if (entryProcessorsBytes == null)
+ if (entryProcessors != null)
Review Comment:
The two cases are inverted, which is why the check moved.
`entryProcessors` here is now `@Marshalled("entryProcessorsBytes")`, and the
generated unmarshal nulls the companion once it has inflated it —
`GridNearAtomicFullUpdateRequestMarshaller:138`, `msg.entryProcessorsBytes =
null;`. So under `@Marshalled` `entryProcessorsBytes == null` means "already
unmarshalled", the opposite of what it used to mean.
In `GridDhtAtomicUpdateRequest` the field is not `@Marshalled` (untouched by
this PR): its hand-written unmarshal keeps the bytes, so there
`entryProcessorsBytes == null` still means "not marshalled yet" and the check
is right. Same for the `invokeArgsBytes == null` check one line below in this
very method — `invokeArgs` stayed on hand-written marshalling, so its check
stayed too. The bytes check was dropped exactly where the field moved to
codegen, not everywhere.
Behaviour is identical either way: `deploy()` runs only on the send path
(`GridCacheIoManager#onSend:1125`, plus two pre-send spots in
`IgniteTxManager`), and on the sending node the companion is always null at
that point, because the only writer is the generated marshal, which runs later
in `GridIoManager#marshal`. Both spellings pick the same branch; the new one
just doesn't become vacuously true on a received message.
Added a one-line comment stating that reason.
--
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]