Phillippko commented on code in PR #12147: URL: https://github.com/apache/ignite/pull/12147#discussion_r2189371236
########## modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java: ########## @@ -4571,16 +4570,17 @@ protected boolean releaseForRetry(Tail<L> t) { // Here we wanted to do a regular merge after all the important operations, // so we can leave this invalid tail as is. We have no other choice here // because our tail is not long enough for retry. Exiting. - assert isRemoved(); - assert needReplaceInner != TRUE && needMergeEmptyBranch != TRUE; + assert isRemoved() && !needReplaceInner && needMergeEmptyBranch != TRUE + : "isRemoved=" + isRemoved() + ", needReplaceInner=" + needReplaceInner + + ", needMergeEmptyBranch=" + needMergeEmptyBranch; return false; } /** {@inheritDoc} */ @Override protected Result finishTail() throws IgniteCheckedException { - assert !isFinished(); - assert tail.type == Tail.EXACT && tail.lvl >= 0 : tail; + assert !isFinished() && tail.type == Tail.EXACT && tail.lvl >= 0 && needMergeEmptyBranch != READY Review Comment: @sergey-chugunov-1985 Just a precaution. ```needMergeEmptyBranch``` uses 4 state boolean and this assertion should catch similar bugs ```finishTail()``` doesn't expect ```needMergeEmptyBranch``` to be READY, and I think it would be READY only if something went wrong -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org