Skip to content

Comments

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

Merged
tlrx merged 1 commit intoelastic:masterfrom
tlrx:be-more-specific-when-clearing-cacjhe
Dec 8, 2020
Merged

Be more specific when clearing cache for searchable snapshots shards#66003
tlrx merged 1 commit intoelastic:masterfrom
tlrx:be-more-specific-when-clearing-cacjhe

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/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. 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/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement Team:Distributed Meta label for distributed team. v7.11.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants