ChrisHegarty commented on code in PR #13570:
URL: https://github.com/apache/lucene/pull/13570#discussion_r1684099998


##########
lucene/core/src/java21/org/apache/lucene/store/RefCountedSharedArena.java:
##########
@@ -47,9 +48,12 @@ boolean acquire() {
     int value;
     while (true) {
       value = state.get();
-      if (value < OPEN) {
+      if (value >= LIMIT) {

Review Comment:
   I considered remodelling the state here (separating the count and state), in 
order to disallow future acquire, even after releases - so hitting the limit 
would be a terminal state. But it seemed not worth it, given our usage. 



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