Allow re-allocation of replica shards on nodes during shutdown replacement#79171
Merged
dakrone merged 1 commit intoelastic:masterfrom Oct 15, 2021
Merged
Conversation
This commit allows replica shards that have existing data on disk to be re-allocated to the target of a "REPLACE" type node shutdown. Prior to this if the target node of a shutdown were to restart, the replicas would not be allowed to be allocated even if their data existed on disk. Relates to elastic#70338 as a follow-up to elastic#76247
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
| final String nodeA = internalCluster().startNode(); | ||
| final String nodeAId = getNodeId(nodeA); | ||
| createIndex("myindex", Settings.builder().put("index.number_of_shards", 1).put("index.number_of_replicas", 1).build()); | ||
| ensureYellow("myindex"); |
Contributor
There was a problem hiding this comment.
I think ensureYellow is unnecessary, since create will wait for one active shard?
Member
Author
There was a problem hiding this comment.
yeah, it is, but it's also being explicit in the test so that whoever is reading it knows what state we expect to have the index in, so I'd prefer to keep it in unless you have strong feelings about it :)
henningandersen
approved these changes
Oct 15, 2021
dakrone
added a commit
to dakrone/elasticsearch
that referenced
this pull request
Oct 15, 2021
…ement (elastic#79171) This commit allows replica shards that have existing data on disk to be re-allocated to the target of a "REPLACE" type node shutdown. Prior to this if the target node of a shutdown were to restart, the replicas would not be allowed to be allocated even if their data existed on disk. Relates to elastic#70338 as a follow-up to elastic#76247
Collaborator
💚 Backport successful
|
elasticsearchmachine
pushed a commit
that referenced
this pull request
Oct 15, 2021
…ement (#79171) (#79266) This commit allows replica shards that have existing data on disk to be re-allocated to the target of a "REPLACE" type node shutdown. Prior to this if the target node of a shutdown were to restart, the replicas would not be allowed to be allocated even if their data existed on disk. Relates to #70338 as a follow-up to #76247
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 commit allows replica shards that have existing data on disk to be re-allocated to the target
of a "REPLACE" type node shutdown. Prior to this if the target node of a shutdown were to restart,
the replicas would not be allowed to be allocated even if their data existed on disk.
Relates to #70338 as a follow-up to #76247