rezataroosheh opened a new pull request, #13828: URL: https://github.com/apache/ignite/pull/13828
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, `CacheInterceptor.onBeforePut()` is called inside `BPlusTree.invoke()`, from `GridCacheMapEntry.AtomicCacheUpdateClosure.update()`. If it returns a value of an `Externalizable` class that isn't registered yet, `prepareForCache()` marshals the value there, and the thread waits for the class registration inside the tree. An interrupt ends the wait with a `BinaryObjectException`. `BPlusTree.invoke()` reports it as `CorruptedTreeException`, and the failure handler is called, although nothing is corrupted. IGNITE-29241 fixes the same problem for `put`, `putAll`, `invoke` and `invokeAll`, but not for the interceptor, because the interceptor's value only exists inside the tree. ### Test `AtomicInterceptorPutInterruptTest` (added to `IgniteCacheTestSuite9`) holds back the class name registration with a discovery hook, runs a `put` on an interrupted thread, 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 class` from `UserCacheObjectImpl.prepareForCache()` in `AtomicCacheUpdateClosure.update()`, caused by `IgniteInterruptedCheckedException`. ### 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]
