Skip to content

IGNITE-29276 Do not stop the node when an interrupted ATOMIC put's interceptor returns a new Externalizable class - #13828

Draft
rezataroosheh wants to merge 1 commit into
apache:masterfrom
rezataroosheh:IGNITE-29276
Draft

rezataroosheh wants to merge 1 commit into
apache:masterfrom
rezataroosheh:IGNITE-29276

Conversation

@rezataroosheh

Copy link
Copy Markdown
Contributor

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)
  • 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 or TC.Bot - Instance 2)

…upted ATOMIC put whose interceptor returns a new Externalizable class
@rezataroosheh rezataroosheh changed the title IGNITE-29276 Do not stop the node when an interrupted ATOMIC put's interceptor returns a new Externalizable class IGNITE-29276 Do not stop the node when an interrupted ATOMIC put's interceptor returns a new Externalizable class Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant