ibessonov commented on code in PR #6188: URL: https://github.com/apache/ignite-3/pull/6188#discussion_r2184976139
########## 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: I can extract computations, but I'm afraid that constants would the code less readable. You know off the bat what `~7L` means, while parsing a name and identifying what it means takes more time. What this class really needs is some documentation -- 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