-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Do not update number of replicas on no indices #34481
Merged
jasontedor
merged 2 commits into
elastic:master
from
jasontedor:number-of-replicas-wildcards
Oct 15, 2018
Merged
Do not update number of replicas on no indices #34481
jasontedor
merged 2 commits into
elastic:master
from
jasontedor:number-of-replicas-wildcards
Oct 15, 2018
Conversation
This file contains 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
Today when submitting an update settings request to update the number of replicas with a wildcard that does not match any indices and allow no indices is set to true, the request ends up being interpreted as updating the number of replicas for all indices. That is, consider the following sequence: PUT /test-index { "settings": { "index.number_of_replicas": 0 } } PUT /non-existent-*/_settings?expand_wildcards=open&allow_no_indices=true { "settings": { "index.number_of_replicas": 1 } } GET /test-index/_settings The latter will show that the number of replicas on test-index is now one. This is surprising, and should be considered a bug. The underlying problem here is treating no indices in the underlying methods used to update the routing table and the metadata as meaning all indices. This commit takes away this assumption. Tests that relied on this behavior have been changed to no longer rely on this. A test for this situation is added in UpdateNumberOfReplicasIT.
jasontedor
added
>bug
:Data Management/Indices APIs
APIs to create and manage indices and templates
v7.0.0
v6.5.0
labels
Oct 15, 2018
Pinging @elastic/es-core-infra |
martijnvg
approved these changes
Oct 15, 2018
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
jasontedor
added a commit
that referenced
this pull request
Oct 15, 2018
Today when submitting an update settings request to update the number of replicas with a wildcard that does not match any indices and allow no indices is set to true, the request ends up being interpreted as updating the number of replicas for all indices. That is, consider the following sequence: PUT /test-index { "settings": { "index.number_of_replicas": 0 } } PUT /non-existent-*/_settings?expand_wildcards=open&allow_no_indices=true { "settings": { "index.number_of_replicas": 1 } } GET /test-index/_settings The latter will show that the number of replicas on test-index is now one. This is surprising, and should be considered a bug. The underlying problem here is treating no indices in the underlying methods used to update the routing table and the metadata as meaning all indices. This commit takes away this assumption. Tests that relied on this behavior have been changed to no longer rely on this. A test for this situation is added in UpdateNumberOfReplicasIT.
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Oct 15, 2018
* master: Do not update number of replicas on no indices (elastic#34481) Core: Remove two methods from AbstractComponent (elastic#34336) Use RoleRetrievalResult for better caching (elastic#34197) Revert "Search: Fix spelling mistake in Javadoc (elastic#34480)" Search: Fix spelling mistake in Javadoc (elastic#34480) Docs: improve formatting of Query String Query doc page (elastic#34432) Tests: Handle epoch date formatters edge cases (elastic#34437) Test: Fix running with external cluster Fix handling of empty keyword in terms aggregation (elastic#34457) [DOCS] Fix tag in SecurityDocumentationIT [Monitoring] Add additional necessary mappings for apm-server (elastic#34392) SCRIPTING: Move Aggregation Script Context to its own class (elastic#33820) MINOR: Remove Deadcode in ExpressionTermSetQuery (elastic#34442) HLRC: Get SSL Certificates API (elastic#34135)
kcm
pushed a commit
that referenced
this pull request
Oct 30, 2018
Today when submitting an update settings request to update the number of replicas with a wildcard that does not match any indices and allow no indices is set to true, the request ends up being interpreted as updating the number of replicas for all indices. That is, consider the following sequence: PUT /test-index { "settings": { "index.number_of_replicas": 0 } } PUT /non-existent-*/_settings?expand_wildcards=open&allow_no_indices=true { "settings": { "index.number_of_replicas": 1 } } GET /test-index/_settings The latter will show that the number of replicas on test-index is now one. This is surprising, and should be considered a bug. The underlying problem here is treating no indices in the underlying methods used to update the routing table and the metadata as meaning all indices. This commit takes away this assumption. Tests that relied on this behavior have been changed to no longer rely on this. A test for this situation is added in UpdateNumberOfReplicasIT.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>bug
:Data Management/Indices APIs
APIs to create and manage indices and templates
v6.5.0
v7.0.0-beta1
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.
Today when submitting an update settings request to update the number of replicas with a wildcard that does not match any indices and allow no indices is set to true, the request ends up being interpreted as updating the number of replicas for all indices. That is, consider the following sequence:
The latter will show that the number of replicas on test-index is now one. This is surprising, and should be considered a bug.
The underlying problem here is treating no indices in the underlying methods used to update the routing table and the metadata as meaning all indices. This commit takes away this assumption. Tests that relied on this behavior have been changed to no longer rely on this.
A test for this situation is added in
UpdateNumberOfReplicasIT
.