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


##########
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:
   Is this creating one `AtomicInteger` per actually originally opened files?  
And then each clone shares that same original `AtomicInteger`?
   
   Hmm what happens when we overflow the int?  What does `incrementAndGet` do 
then?  Silently overflow/wraparound to negative?



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