Repository navigation
IGNITE-29276 Do not stop the node when an interrupted ATOMIC update makes a value of a new Externalizable class inside the B+Tree - #13828
Draft
rezataroosheh wants to merge 1 commit into
Conversation
…upted ATOMIC put whose interceptor returns a new Externalizable class
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-29276
Status
Draft. For now this PR only adds a test that reproduces the problem on master. The fix will follow.
Problem
In an ATOMIC cache, three kinds of values are created inside
BPlusTree.invoke(), inGridCacheMapEntry.AtomicCacheUpdateClosure, and marshaled there:CacheInterceptor.onBeforePut(), inAtomicCacheUpdateClosure.update();GridCacheVersionConflictContext.mergeValue()), inAtomicCacheUpdateClosure.resolveConflict();put, inAtomicCacheUpdateClosure.readOldValue(). Aputreads through whenCacheConfiguration.isLoadPreviousValue()is set and the old value is needed, for example by an interceptor, a filter orgetAndPut().If such a value is of an
Externalizableclass that isn't registered yet, the thread waits for the class registration inside the tree. An interrupt ends the wait with aBinaryObjectException.BPlusTree.invoke()reports it asCorruptedTreeException, and the failure handler is called, although nothing is corrupted.IGNITE-29241 fixes the same problem for the values of
put,putAll,invokeandinvokeAll, but not for these three values, because on these paths they only exist inside the tree.Test
AtomicInterceptorPutInterruptTest(added toIgniteCacheTestSuite9) holds back the class name registration with a discovery hook, runs aputon an interrupted thread into a cache whose interceptor returns anExternalizablevalue, and checks that the put fails and the failure handler isn't called.Result on master: the test fails with
Failure handler was called: CorruptedTreeException: B+Tree is corrupted [... msg=Runtime failure on search row ...],caused by
BinaryObjectException: Failed to register classfromUserCacheObjectImpl.prepareForCache()inAtomicCacheUpdateClosure.update(), caused byIgniteInterruptedCheckedException.The conflict resolver and read-through values are marshaled by the same
prepareForCache()calls inside the tree. Tests for them will be added with the fix.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)