opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.62k stars 1.76k forks source link

[Feature Request] Snapshot restore should allow renaming aliases #15632

Open mispencer opened 1 month ago

mispencer commented 1 month ago

Is your feature request related to a problem? Please describe

Snapshot restore takes a pair of arguments to allow renaming indexes into new names. The common example use case to restore snapshots into the same cluster as temporary separate indexes for research and debugging. However, this is problematic if this indexes has aliases to be restored. I am not sure if the indexes will be linked to the existing aliases or this is an error, but either case would problematic, since this either breaks desired isolation or fails.

Describe the solution you'd like

Snapshot restore should take a new pair of arguments to allow renaming aliases into new names to match the existing pair of arguments for index renaming. For backend compatibility, these arguments should be optional.

Related component

Storage:Snapshots

Describe alternatives you've considered

In some cases, it may be possible to restore any necessary aliases after the snapshot restore is completed. It is also possible to restore into another cluster. The drawbacks of these two options is obvious, however.

Additional context

No response

ashking94 commented 2 weeks ago

Thanks for filing this issue, please feel free to submit a pull request. [Triage - attendees 1 2 3 4 5]