Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip unreferenced files pruning after restore for searchable snapshot…
…s shards (elastic#68821) (elastic#68843) When a shard is restored from a snapshot there is an after restore step during which files on disk that are not referenced anymore by the restored segments infos file are deleted from disk. The deletion is executed using the Lucene.pruneUnreferencedFiles() method which opens a new IndexWriter and closes it in order to kick off Lucene's internal index files deleter. This step is not necessary for searchable snapshot shards which use the snapshot store type because such shards report a list of files coming from a shard snapshot which never contain unreferenced files. Skipping this step avoids extra unnecessary work when mounting a searchable snapshot index.
- Loading branch information