Skip to content
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

Be more specific when clearing cache for searchable snapshots shards #66003

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Dec 8, 2020

Today we evict all cache files that belong to a given searchable snapshot directory when this directory is closed or if the Clear Cache API is used. This eviction iterates over all cache entries and find the entries that matches a given shard. We can be more specific than that by recreating the cache keys to evict from the list of file names instead of iterating over entries.

@tlrx tlrx added >enhancement :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.11.0 labels Dec 8, 2020
@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team (obsolete) label Dec 8, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tlrx tlrx merged commit 4e6e9de into elastic:master Dec 8, 2020
@tlrx tlrx deleted the be-more-specific-when-clearing-cacjhe branch December 8, 2020 10:48
@tlrx
Copy link
Member Author

tlrx commented Dec 8, 2020

Thanks David

tlrx added a commit to tlrx/elasticsearch that referenced this pull request Dec 8, 2020
…6003)

Today we evict all cache files that belong to a given searchable
snapshot directory when this directory is closed or if the Clear
Cache API is used. This eviction iterates over all cache entries
and find the entries that matches a given shard. We can be
 more specific than that by recreating the cache keys to evict
from the list of file names instead of iterating over entries.
tlrx added a commit that referenced this pull request Dec 8, 2020
Today we evict all cache files that belong to a given searchable
snapshot directory when this directory is closed or if the Clear
Cache API is used. This eviction iterates over all cache entries
and find the entries that matches a given shard. We can be
 more specific than that by recreating the cache keys to evict
from the list of file names instead of iterating over entries.

Backport of  #66003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement Team:Distributed Meta label for distributed team (obsolete) v7.11.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants