-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a configuration for an index cache ttl #6234
base: master
Are you sure you want to change the base?
Conversation
b43ddd9
to
1a2b364
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
I think it probably needs more discussion on how we wanna do this. From my perspective, there are certain index cache items that worth a larger TTL than others.
For example, default TTL is 1 day but I might want to cache expanded postings for one week and other index cache types for only 1 day or shorter.
Cache entries from a 24h block might worth a longer TTL than 2h range uncompacted blocks because uncompacted blocks will be removed in a short period of time.
I am not against this PR. Just feel that the end state should be more flexible rather than a global TTL for everything.
@yeya24 |
1a2b364
to
3b0fb0c
Compare
@SungJin1212 Agree. I think it would be useful to extend the interface to support TTL. The TTL could be a function that takes block metadata info as a parameter so that we know we use longer TTL for L4 blocks. |
@yeya24 |
3b0fb0c
to
7f2c86d
Compare
7f2c86d
to
05bca36
Compare
Signed-off-by: SungJin1212 <[email protected]>
05bca36
to
27b73a1
Compare
Add a configuration for an index cache ttl. The index cache ttl can be configured by
-blocks-storage.bucket-store.index-cache.redis.index-ttl
and-blocks-storage.bucket-store.index-cache.memcached.index-ttl
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]