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


##########
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:
   @Phillippko, which tree invariant is protected by this new addition to 
assertion? There was no assertion about `needMergeEmptyBranch` in original code 
- was something new discovered?



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