Make searchable snapshots cache persistent #66275
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The searchable snapshots cache implemented in 7.10 is
not persisted across node restarts, forcing data nodes to
download files from the snapshot repository again once
the node is restarted.
This commit introduces a new Lucene index that is used
to store information about cache files. The information
about cache files are periodically updated and committed
in this index as part of the cache synchronization task
added in #64696. When the data node starts the Lucene
index is used to load in memory the cache files information;
these information are then used to repopulate the searchable
snapshots cache with the cache files that exist on disk.
Since data nodes can have one or more data paths, this
change introduces a Lucene index per data path. Information
about cache files are updated in the Lucene index located
on the same data path of the cache files.
Backport of #65725 for 7.11