anton-vinogradov commented on code in PR #13095:
URL: https://github.com/apache/ignite/pull/13095#discussion_r3658466235
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java:
##########
@@ -359,35 +324,38 @@ CacheObject oldValue() {
return depInfo;
}
-
/** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(CacheContinuousQueryEntry.class, this);
+ @Override public void marshal(Marshaller marsh) throws
IgniteCheckedException {
Review Comment:
This is master's own shape, only re-typed. On master the class already
carries the same field pairs and the same guard — `KeyCacheObject key` plus
`@Order byte[] keyBytes`, with prepareMarshal(Marshaller) filling the
companions only `if (!isFiltered())`. What the PR changes is the wire type of
the companion: a marshaller blob becomes the typed KeyCacheObject/CacheObject
written directly by the generated serializer, which also removes the extra
round-trip through BinaryMarshaller.
The pair exists because the generated serializer writes @Order fields
unconditionally — there is no per-field conditional or converter facility in
the codegen — while the wire contract is that a filtered entry carries no
key/values and the local instance must keep them (an entry is marked filtered
after it was created with data, and consumers still read it afterwards, e.g.
CacheQueryReadEvent).
Agreed on the separate ticket: IGNITE-28922, with a TODO left on the hooks.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java:
##########
@@ -359,35 +324,38 @@ CacheObject oldValue() {
return depInfo;
}
-
/** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(CacheContinuousQueryEntry.class, this);
+ @Override public void marshal(Marshaller marsh) throws
IgniteCheckedException {
+ if (!isFiltered()) {
+ keyWire = key;
+ newValWire = newVal;
+ oldValWire = oldVal;
+ }
}
/** {@inheritDoc} */
- @Override public void prepareMarshal(Marshaller marsh) throws
IgniteCheckedException {
- if (!isFiltered()) {
- if (key != null)
- keyBytes = marsh.marshal(key);
+ @Override public void unmarshal(Marshaller marsh, ClassLoader clsLdr)
throws IgniteCheckedException {
Review Comment:
Same contract, the unmarshal half — see the thread above. The wire -> local
move is what master's finishUnmarshal does as well (`key =
marsh.unmarshal(keyBytes, clsLdr)`): every consumer of the entry reads the
local fields, not the @Order ones. The null guard keeps the hook idempotent, so
a filtered entry stays without key/values — which is what
IgniteCacheContinuousQueryImmutableEntryTest asserts. Follow-up ticket:
IGNITE-28922.
--
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]