rpuch commented on code in PR #6188: URL: https://github.com/apache/ignite-3/pull/6188#discussion_r2184915994
########## 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: How about extracting the method to compute ptr? Also, there are magic constants. Is it possible to extract named constants? -- 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