sergey-chugunov-1985 commented on code in PR #12147:
URL: https://github.com/apache/ignite/pull/12147#discussion_r2197652100


##########
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:
   Ok, I see. It looks like when `finishTail()` is called 
`needMergeEmptyBranch` indeed cannot be `READY`. It can get this value briefly 
inside `mergeEmptyBranch` and subsequent calls but shortly after that it 
transitions to `DONE` or `FALSE` if retry is needed.



-- 
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

Reply via email to