Repository navigation
IGNITE-29291 Fix wrong near cache values after an ATOMIC invokeAll with a write-through store leaves a key unchanged - #13829
Draft
rezataroosheh wants to merge 1 commit into
Draft
rezataroosheh wants to merge 1 commit into
rezataroosheh wants to merge 1 commit into
Conversation
… an ATOMIC invokeAll with a write-through store leaves a key unchanged
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-29291
Status
Draft. For now this PR only adds a test that reproduces the problem on master. The fix will follow.
Problem
For a request with several keys on a cache with a write-through store, the primary node uses
GridDhtAtomicCache.updateWithBatch(). It collects the entries to write in a list and passesfirstEntryIdxtoupdatePartialBatch(), which usesfirstEntryIdx + ias the request index of the i-th entry. A key that is skipped without being added to the list (a read-only invoke, a value that fails validation, an update canceled by the interceptor) leaves a gap, so the following keys get the wrong request index. That index is used for the near cache values and skipped indexes sent back to the node that made the request, and fordhtUpdRes.processedEntriesCount().Test
AtomicNearCacheInvokeAllWithStoreTest(added toIgniteCacheTestSuite10) starts a server and a client with a near cache. The client puts keys 1, 2, and 3, then callsinvokeAllon them with an entry processor that sets each value to its key but leaves key 2 unchanged. The test checks the client's near cache.Result on master: the test fails with
The unchanged key has a wrong value in the near cache expected:<-1> but was:<3>.Also, the client fails with an
AssertionErrorinGridNearAtomicCache.processNearAtomicUpdateResponse()(assert req.operation() != TRANSFORM), and the failure handler is called withCRITICAL_ERROR.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)