mikemccand commented on code in PR #15585:
URL: https://github.com/apache/lucene/pull/15585#discussion_r2718698084
##########
lucene/core/src/java/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -316,7 +335,7 @@ public void prefetch(long offset, long length) throws
IOException {
ensureOpen();
- if (BitUtil.isZeroOrPowerOfTwo(consecutivePrefetchHitCount++) == false) {
+ if (BitUtil.isZeroOrPowerOfTwo(sharedPrefetchCounter.incrementAndGet()) ==
false) {
Review Comment:
Does it matter that before it was get-and-increment and now it's
increment-and-get? E.g. we will now start with 0 and get `true` the first
time, but previously false, so won't we fail to check the first time we come
through with this change?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]