opensearch-project/OpenSearch

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

开放

#11,044 创建于 2023年11月1日

 (2 条评论) (0 个反应) (0 位负责人)Java (1,505 个派生)batch import
Storage:DurabilityStorage:Remotebuggood first issue

仓库指标

星标
 (8,123 个星标)
PR 合并指标
 (平均合并 5天 9小时) (30 天内合并 266 个 PR)

描述

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 .

贡献者指南