Repository navigation
IGNITE-29226 Fix remote transformed continuous query events arriving as BinaryObject on a keep-binary cache - #13770
Open
rezataroosheh wants to merge 3 commits into
Open
rezataroosheh wants to merge 3 commits into
rezataroosheh wants to merge 3 commits into
Conversation
…the transformer returns a BinaryObject
Possible compatibility issues. Please, check rolling upgrade casesThis PR modifies protected classes (with Order annotation). Affected files:
|
rezataroosheh
marked this pull request as ready for review
October 31, 2026 17:06
4 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: https://issues.apache.org/jira/browse/IGNITE-29226
What
A
ContinuousQueryWithTransformeron a keep-binary cache (withKeepBinary()) now delivers the transformer's result to the listener as it was returned, for both local and remote events. Before this fix, a remote event whose transformer returned a user class (for examplePersonId) arrived asBinaryObject, while a local event arrived asPersonId. A transformer that returns aBinaryObjectstill delivers aBinaryObject.Why
On the remote node,
CacheContinuousQueryHandler#transformToEntrywraps the transformer result into a cache object and copies the cache entry's keep-binary flag into the new entry. On the listener node,CacheContinuousQueryEvent#getValueunwraps the value using that flag, so the result stayed binary. The flag describes the cache entry, not the transformer result. It was reported on the dev list.The fix sets the keep-binary flag of the transformed entry only if the transformer result is a
BinaryObject, and clears the copied flag bit otherwise (CacheContinuousQueryEntry#removeKeepBinary). This matches the local path, where the listener gets the transformer result directly.Compatibility: code that reads remote transformed events of a keep-binary cache as
BinaryObjectwill now get the transformer's own result class, the same as for local events. Such code can return aBinaryObjectfrom the transformer.Related: IGNITE-29227 (same reporter, events held on an
ATOMICcache).Tests
CacheContinuousWithTransformerKeepBinaryTest, with two server nodes, aTRANSACTIONALcache, one key whose primary is the query node and one whose primary is the other node:testNonBinaryResultArrivesAsIs: a transformer returningPersonIddeliversPersonIdfor both events. It fails without the fix (the remote event is aBinaryObjectImpl).testBinaryValueResultArrivesAsIs: a transformer returning the binary value deliversBinaryObjectfor both events.testBinaryKeyResultArrivesAsIs: a transformer returning the binary key deliversBinaryObjectfor both events.PersonId.idis@AffinityKeyMapped, so aPersonIdkey has the same primary node as its id.The cache is
TRANSACTIONALon purpose: on anATOMICcache, IGNITE-29227 would interfere, since the result class is not registered yet.The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached to the JIRA ticket (see tabPR Checkat TC.Bot - Instance 1 or TC.Bot - Instance 2)Notes
If you need any help, please email dev@ignite.apache.org or ask any advice on https://the-asf.slack.com #ignite channel.