opensearch-project/OpenSearch

[Remote Store] Remove redundant uploads while restoring data from snapshot

Open

#11.044 geöffnet am 1. Nov. 2023

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (1.505 Forks)batch import
Storage:DurabilityStorage:Remotebuggood first issue

Repository-Metriken

Stars
 (8.123 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 9h) (266 gemergte PRs in 30 T)

Beschreibung

Describe the bug

If we restore a remote store backed index from an interop enabled repository, we are uploading all the data in remote. This is not needed when there is preexisting data in remote store. There can be preexisting data , when the index is closed and we try to restore it back in time from a snapshot.

https://github.com/opensearch-project/OpenSearch/blob/aa0fddb50d6150330718ac0af23b72bd1598ae4a/server/src/main/java/org/opensearch/index/shard/IndexShard.java#L4916-L4922

Given that we have enabled upload during snapshot restore, there is no need to copy the segment files manually to remoteDirectory .

Contributor Guide