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

   `LuceneTestCaseParent` currently assigns a new LRUQueryCache instance to 
each of its test methods, as well as one to the code execution outside of tests 
(e.g. before class methods)
   
   This is important to make sure that each index searcher used starts with its 
own instance of LRUQueryCache.
   
   All of the different instances are currently piled up in a static list, that 
gets iterated on in the after class method, which closes each item. The static 
list is never cleared, hence it ends up holding a lot of references. Each cache 
could be closed straight-away once it's out of scope. As a consequence, you can 
have extreme scenarios where accumulating query caches in the static list 
causes OOM.
   
   This commit removes the list, and attempts to release resources held by the 
different LRU query caches instances as early as possible, by introducing an 
after test method.
   
   The after class method stays but it closes only the static LRU query cache, 
no longer a list.


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