rezataroosheh opened a new pull request, #13829: URL: https://github.com/apache/ignite/pull/13829
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 passes `firstEntryIdx` to `updatePartialBatch()`, which uses `firstEntryIdx + i` as 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 for `dhtUpdRes.processedEntriesCount()`. ### Test `AtomicNearCacheInvokeAllWithStoreTest` (added to `IgniteCacheTestSuite10`) starts a server and a client with a near cache. The client puts keys 1, 2, and 3, then calls `invokeAll` on 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 `AssertionError` in `GridNearAtomicCache.processNearAtomicUpdateResponse()` (`assert req.operation() != TRANSFORM`), and the failure handler is called with `CRITICAL_ERROR`. ### The Contribution Checklist - [ ] There is a single JIRA ticket related to the pull request. - [ ] The web-link to the pull request is attached to the JIRA ticket. - [ ] The JIRA ticket has the _Patch Available_ state. - [ ] The pull request body describes changes that have been made. The description explains _WHAT_ and _WHY_ was made instead of _HOW_. - [ ] The pull request title is treated as the final commit message. The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue. - [ ] A reviewer has been mentioned through the JIRA comments (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) - [ ] The pull request has been checked by the Teamcity Bot and the `green visa` attached to the JIRA ticket (see tab `PR Check` at [TC.Bot - Instance 1](https://tcbot2.sbt-ignite-dev.ru/prs.html) or [TC.Bot - Instance 2](https://mtcga.gridgain.com/prs.html)) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
