Allow snapshotting replicated closed indices#39644
Merged
ywelsch merged 5 commits intoelastic:masterfrom Mar 6, 2019
Merged
Conversation
Collaborator
|
Pinging @elastic/es-distributed |
ywelsch
commented
Mar 4, 2019
| private String[] indices = EMPTY_ARRAY; | ||
|
|
||
| private IndicesOptions indicesOptions = IndicesOptions.strictExpandOpen(); | ||
| private IndicesOptions indicesOptions = IndicesOptions.strictExpand(); |
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
|
https://github.com/elastic/elasticsearch/pull/39644/files#diff-26934c4ac1260dd2d92d86b427567676L135 seems to be tripping checkstyle still |
Contributor
|
@ywelsch looks like we have a possible related test failure: edit: timing ... :) |
Contributor
|
@ywelsch seems that same test is still unstable: |
original-brownbear
approved these changes
Mar 5, 2019
Contributor
original-brownbear
left a comment
There was a problem hiding this comment.
LGTM, just one question about a test :)
server/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java
Show resolved
Hide resolved
ywelsch
added a commit
that referenced
this pull request
Mar 6, 2019
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
original-brownbear
added a commit
that referenced
this pull request
May 14, 2020
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.
original-brownbear
added a commit
that referenced
this pull request
Jul 13, 2020
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_wildcardsoption either toallorclosed(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