-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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 snapshotting replicated closed indices #39644
Allow snapshotting replicated closed indices #39644
Conversation
Pinging @elastic/es-distributed |
@@ -70,7 +70,7 @@ | |||
|
|||
private String[] indices = EMPTY_ARRAY; | |||
|
|||
private IndicesOptions indicesOptions = IndicesOptions.strictExpandOpen(); | |||
private IndicesOptions indicesOptions = IndicesOptions.strictExpand(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be changed back to IndicesOptions.strictExpandOpen
for the 7.x backport.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
https://github.com/elastic/elasticsearch/pull/39644/files#diff-26934c4ac1260dd2d92d86b427567676L135 seems to be tripping checkstyle still |
@ywelsch looks like we have a possible related test failure:
edit: timing ... :) |
@ywelsch seems that same test is still unstable:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one question about a test :)
server/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java
Show resolved
Hide resolved
This adds the capability to snapshot replicated closed indices. It also changes snapshot requests in v8.0.0 to automatically expand wildcards to closed indices and hence start snapshotting closed indices by default. For v7.1.0 and above, wildcards are by default only expanded to open indices, which can be changed by explicitly setting the expand_wildcards option either to all or closed. Note that indices are always restored as open indices, even if they have been snapshotted as closed replicated indices. Relates to #33888
The code path for closed indices is dead code here ever since elastic#39644 because `shards(currentState, indexIds, ...)` does not set `MISSING` on a closed index's shard any longer. => simplified the code accordingly.
The code path for closed indices is dead code here ever since #39644 because `shards(currentState, indexIds, ...)` does not set `MISSING` on a closed index's shard that is assigned any longer. Before that change it would always set `MISSING` for a closed index's shard even it was assigned. => simplified the code accordingly.
The code path for closed indices is dead code here ever since elastic#39644 because `shards(currentState, indexIds, ...)` does not set `MISSING` on a closed index's shard that is assigned any longer. Before that change it would always set `MISSING` for a closed index's shard even it was assigned. => simplified the code accordingly.
The code path for closed indices is dead code here ever since #39644 because `shards(currentState, indexIds, ...)` does not set `MISSING` on a closed index's shard that is assigned any longer. Before that change it would always set `MISSING` for a closed index's shard even it was assigned. => simplified the code accordingly.
This PR adds the capability to snapshot replicated closed indices.
It also changes snapshot requests in v8.0.0 to automatically expand wildcards to closed indices and hence start snapshotting closed indices by default. For v7.2.0 and above, wildcards are by default only expanded to open indices, which can be changed by explicitly setting the
expand_wildcards
option either toall
orclosed
(see https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-index.html).Note that indices are always restored as open indices, even if they have been snapshotted as closed replicated indices.
Relates to #33888