[Metadata] Let entries expire in the metadata caches#14154
[Metadata] Let entries expire in the metadata caches#14154codelipenghui merged 2 commits intoapache:masterfrom
Conversation
- refreshAfterWrite will never expire entries. After the given time, the next request to the entry will trigger a refresh in the background. The current entry will be used until the entry has been refreshed. - documentation for Caffeine's refresh feature: https://github.com/ben-manes/caffeine/wiki/Refresh
|
@lhotari:Thanks for your contribution. For this PR, do we need to update docs? |
1 similar comment
|
@lhotari:Thanks for your contribution. For this PR, do we need to update docs? |
|
@lhotari:Thanks for providing doc info! |
eolivelli
left a comment
There was a problem hiding this comment.
This change makes sense to me.
It will also allow to remove more quickly stale data probably
Jason918
left a comment
There was a problem hiding this comment.
I think it's better not to increase metadata load, how about
- refresh after
CACHE_REFRESH_TIME_MILLIS - expire after
CACHE_REFRESH_TIME_MILLIS * 2
@Jason918 thanks, I changed it in this way. PTAL |
* [Metadata] Let entries expire in the metadata caches - refreshAfterWrite will never expire entries. After the given time, the next request to the entry will trigger a refresh in the background. The current entry will be used until the entry has been refreshed. - documentation for Caffeine's refresh feature: https://github.com/ben-manes/caffeine/wiki/Refresh * Address review comments
Motivation
refreshAfterWritewill never expire entries. After the given time, the next request to the entry willtrigger a refresh in the background. The current entry will be used until the entry has been refreshed.
Modifications
CACHE_REFRESH_TIME_MILLIS * 2