Repository navigation
IGNITE-29227 Fix lost continuous query events with an unregistered transformer result class on an ATOMIC cache - #13769
Open
rezataroosheh wants to merge 4 commits into
Open
rezataroosheh wants to merge 4 commits into
rezataroosheh wants to merge 4 commits into
Conversation
…esult class on an ATOMIC cache
… in the async callback pool
rezataroosheh
force-pushed
the
IGNITE-29227
branch
from
November 1, 2026 11:38
90116a5 to
043fd72
Compare
rezataroosheh
marked this pull request as ready for review
November 1, 2026 11:46
…t and send in the async callback pool
Possible compatibility issues. Please, check rolling upgrade casesThis PR modifies protected classes (with Order annotation). Affected files:
|
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-29227
What
A
ContinuousQueryWithTransformeron anATOMICcache now delivers the events of a partition whose primary is another node when the class of the transformer result is not yet registered on that node. Before this fix, the listener got none of these events, and later events of the same partition were held as well.Why
On the primary node, an
ATOMICupdate notifies the continuous query while it holds the topology read lock. For a listener on another node,CacheContinuousQueryHandler#transformToEntryconverts the transformer result to a cache object. Registering a new class is not allowed under the topology lock, so the conversion throwsUnregisteredClassExceptionpart-way through the notification.GridDhtAtomicCachethen registers the class and retries the update with the next update counter. The event for the first counter is never sent, soCacheContinuousQueryPartitionRecoveryon the listener node holds the partition's later events, waiting for it. It was reported on the dev list.The fix splits the notification for a listener on another node of an
ATOMICcache into two parts:P2PClassLoadingFailureHandlingTest).notifyRemoteListener) runs in the async callback pool, striped by partition, so the events of a partition keep their order. This runs outside the topology lock, so the class can be registered there.Local listeners,
TRANSACTIONALcaches and queries with an@IgniteAsyncCallbackfilter keep their current behavior.This is one possible approach. I'm open to another direction if you prefer.
Workaround for current versions: a remote filter annotated with
@IgniteAsyncCallbackthat accepts all events. With it, the test below passes without the fix.Related: IGNITE-29226 (same reporter, remote transformed events on a keep-binary cache), PR #13770.
Tests
CacheContinuousWithTransformerUnregisteredClassTest#testUnregisteredResultClassOnAtomicCache, with two server nodes and anATOMICcache with one backup. The query runs on the first node, and a key whose primary is the second node is put 3 times. The transformer returnsPersonId, a class that is not registered yet. The test checks that all 3 events arrive asPersonId. It fails without the fix (Received: []).P2PClassLoadingFailureHandlingTestpasses unchanged.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.