Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow open indices to be restored #37733

Closed
wants to merge 6 commits into from

Conversation

Tim-Brooks
Copy link
Contributor

Currently, open indices cannot be restored. However, in CCR we have a
use case where we would like to restore an follower index if it has
fallen too far behind a leader index. This commit allows a
restoreOpenIndex parameter to be passed to the restore request. If
this parameter is true, an open index can be restored. This introduces
some concurrency issues (multiple attempts to restore the same index).
So this PR fails a restore request if there is already an in-process
restore for the requested index.

@Tim-Brooks Tim-Brooks added >enhancement :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v7.0.0 v6.7.0 labels Jan 23, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@Tim-Brooks
Copy link
Contributor Author

@ywelsch - I know that we had discussed making restore requests idempotent. But that looks a little tricky to me? We would need to validate that the snapshot, includeAliases, ignoredShards, and other request parameters are the same? Otherwise the requests would have produced different restores. It seemed safer to just reject another request if there is one in progress. Although I can adjust and attempt to implement all the validation (that the different request parameters are the same) if you think it is necessary functionality.

@ywelsch ywelsch closed this Jan 29, 2019
@Tim-Brooks Tim-Brooks deleted the restore_open_indices branch December 18, 2019 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement v6.7.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants