uschindler commented on code in PR #13570: URL: https://github.com/apache/lucene/pull/13570#discussion_r1684589983
########## lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInputProvider.java: ########## @@ -157,6 +157,8 @@ static Arena getSharedArena( arenas.computeIfAbsent(key, s -> new RefCountedSharedArena(s, () -> arenas.remove(s))); if (refCountedArena.acquire()) { return refCountedArena; + } else { + arenas.remove(key); Review Comment: This is cool. Yes let's atomically replace the arena in the map. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org