Repository navigation
IGNITE-29292 Keep the backups consistent when the class registration on retry of an ATOMIC update fails - #13830
Draft
rezataroosheh wants to merge 1 commit into
Draft
rezataroosheh wants to merge 1 commit into
rezataroosheh wants to merge 1 commit into
Conversation
… after the class registration on retry fails
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-29292
Status
Draft. For now this PR only adds a test that reproduces the problem on master. The fix will follow.
Problem
GridDhtAtomicCache.updateAllAsyncInternal0()catchesUnregisteredClassExceptionfromupdate(), registers the class withBinaryContext.registerType(), and retries the update fromdhtUpdRes.processedEntriesCount(). The keys before that index are already written on the primary, and their DHT update waits indhtUpdRes.dhtFuture()to be sent to the backups after the retry.If
registerType()fails (for example, because the thread is interrupted), the error goes to thecatch (Throwable)block. It logs "Unexpected exception during cache update", fails all keys of the request, and returns before the DHT future is mapped. So the keys already written on the primary never reach the backups.Test
AtomicUpdateRetryInterruptTest(added toIgniteCacheTestSuite7) starts two server nodes with an ATOMIC cache with one backup. A discovery hook holds back the class name registration. On an interrupted thread, it runsinvokeAllon two keys of node 0: the entry processor sets 1 for the first key and a value of a new class for the second key. The test checks that the primary and the backup have the same value of the first key.Result on master: the test fails with
The backup has a different value of the first key [primary=1, backup=null].The log shows "Unexpected exception during cache update" with
BinaryObjectException: Failed to register classfromBinaryContext.registerType(), called fromupdateAllAsyncInternal0(), caused byIgniteInterruptedCheckedException.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)