eric-maynard opened a new pull request, #490:
URL: https://github.com/apache/polaris/pull/490

   # Description
   
   The EntityCache currently uses a hard-coded limit of 100k entities, which is 
apparently intended to keep the cache around 100MB based on the assumption that 
entities are ~1KB.
   
   If that assumption is not true, or if there is not even 100MB of free 
memory, we should not let the cache use up too much memory.
   
   This PR adjusts the cache to use [soft 
values](https://github.com/ben-manes/caffeine/wiki/Eviction#reference-based) to 
allow GC to clean up entries when memory pressure becomes too great.
   
   ## Type of change
   
   Please delete options that are not relevant.
   
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Documentation update
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to not work as expected)
   - [ ] This change requires a documentation update
   
   # How Has This Been Tested?
   
   Added a new test in `EntityCacheTest`
   
   # Checklist:
   
   Please delete options that are not relevant.
   
   - [x] I have performed a self-review of my code
   - [x] I have commented my code, particularly in hard-to-understand areas
   - [x] My changes generate no new warnings
   


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