mikemccand commented on code in PR #15585:
URL: https://github.com/apache/lucene/pull/15585#discussion_r2732151120


##########
lucene/core/src/java/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -74,12 +75,28 @@ public static MemorySegmentIndexInput newInstance(
       boolean confined,
       Function<IOContext, ReadAdvice> toReadAdvice) {
     assert 
Arrays.stream(segments).map(MemorySegment::scope).allMatch(arena.scope()::equals);
+    AtomicInteger sharedPrefetchCounter = new AtomicInteger();

Review Comment:
   So net/net I think the behavior is reasonable -- we check with 1/2 the 
frequency, up until `1 << 31 = 2147483648` at which point we stop halving the 
frequency of checks and do it every `2147483648` calls.  That's great -- no 
exception, still checking (rarely!).



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

Reply via email to