ibessonov commented on code in PR #5684: URL: https://github.com/apache/ignite-3/pull/5684#discussion_r2056481244
########## modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/KeyValueStorageUtils.java: ########## @@ -43,14 +43,20 @@ public static int indexToCompact(long[] keyRevisions, long compactionRevisionInc int i = binarySearch(keyRevisions, compactionRevisionInclusive); if (i < 0) { - if (i == -1) { + i = ~i; + + if (i == 0) { return NOT_FOUND; } - i = -(i + 2); + i--; Review Comment: For the reviewer: new code in this block is doing exactly the same thing. I just think it is simpler than it was before. `-(i+2)` is impossible to comprehend -- 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