rpuch commented on code in PR #6188:
URL: https://github.com/apache/ignite-3/pull/6188#discussion_r2185009702


##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/replacement/ClockPageReplacementFlags.java:
##########
@@ -113,7 +111,20 @@ boolean getFlag(int pageIdx) {
      * @param pageIdx Page index.
      */
     public void clearFlag(int pageIdx) {
-        compareAndSwapFlag(pageIdx, flags -> flags & ~(1L << pageIdx));
+        long ptr = flagsPtr + ((pageIdx >> 3) & (~7L));

Review Comment:
   > You know off the bat what ~7L means
   
   I don't :) I have to figure out that it's 0b111, flip it (all within my 
head) and then guess the intentions behind this. I thought it was possible to 
communicate the intention directly via constant name. But if it's not the case, 
let it be in the current form.



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