You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/12/12 22:06:35 UTC

[GitHub] [lucene] vigyasharma commented on issue #12000: Lucene-facet leaves ThreadLocal that creates a memory leak

vigyasharma commented on issue #12000:
URL: https://github.com/apache/lucene/issues/12000#issuecomment-1347406654

   > But one possibility to fix this cache is to replace the ThreadLocal with CloseableThreadLocal, and close it out in close()
   
   `DirectoryTaxonomyWriter` does call `cache.close()` when it gets closed (via `closeResources()`), so I think this is a good idea. 
   
   I updated the cache to use CloseableThreadLocal. Don't have a good way to test for a memory leak, but I added a test to atleast verify that threadlocal memory is removed on close.


-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org