NationalSecurityAgency / timely

Accumulo backed time series database
https://code.nsa.gov/timely/
Apache License 2.0
380 stars 108 forks source link

Delete cached metrics when they are no longer being updated #191

Closed billoley closed 4 years ago

billoley commented 5 years ago

When metrics get rebalanced from a losing server to a gaining server, the metric cache on the losing server takes up space (until expiration) even though it will never be updated or read. If this happens enough, the wasted memory is enough to consume the available heap in the JVM.

Create a configurable period where if a metric has not been updated in this time, it will be dropped from the cache, freeing up the memory.