uschindler opened a new pull request, #15112:
URL: https://github.com/apache/lucene/pull/15112

   This fixes #15106.
   
   This basically only removes the check when an arena's refcount is already 
closed. The problem is if a previous close on the inner arena has failed due to 
concurrent access to the scoped memory segments, the refcount is already in 
state `CLOSED`, so another call from the "retry" spinloop in 
`MemorySegmentIndexInput` will hit our extra check and throws 
`IllegalStateException` again, leading to an endless spinloop.
   
   The extra check is not needed, because if the inner Arena was already 
closed, we do not need to check this before, the inner Arena's close withh 
throw correct exception anyways.
   
   This affects all users which have incorrect code, if your code is sane, you 
won't be affected by the spinloop bug, so it is not so serious like it looks.
   
   @ChrisHegarty I did minimal changes here, but maybe we can no simplify the 
whole refcounting even more? Do we still need the upper and lower 16 bits of 
the atomic state?


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

Reply via email to