cshannon commented on issue #4783:
URL: https://github.com/apache/accumulo/issues/4783#issuecomment-2278207801

   Besides trying to use weak references a simple fix could be to add a max 
size to the number of items that can be stored and maybe have the max size be 
dependent on JVM size. We could even make it more dynamic by setting a maximum 
weight on the cache and providing a 
[weigher](https://github.com/ben-manes/caffeine/blob/98895ffbb5e06b345d69fa969fc116c625b70217/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Weigher.java#L34)
 if the configuration objects are different in size (but they are probably all 
pretty similar). 
   
   Having a max size might make the most sense if we are only expected to have 
a few in memory and then if something else creates a bunch (like in unit 
testing) we can just evict old ones.


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

Reply via email to