Check shard limit after applying index templates#44619
Merged
jasontedor merged 6 commits intoelastic:masterfrom Jul 23, 2019
Merged
Check shard limit after applying index templates#44619jasontedor merged 6 commits intoelastic:masterfrom
jasontedor merged 6 commits intoelastic:masterfrom
Conversation
Today when creating an index and checking cluster shard limits, we check the number of shards before applying index templates. At this point, we do not know the actual number of shards that will be used to create the index. In a case when the defaults are used and a template would override, we could be grossly underestimating the number of shards that would be created, and thus incorrectly applying the limits. This commit addresses this by checking the shard limits after applying index templates.
Collaborator
|
Pinging @elastic/es-core-features |
AthenaEryma
approved these changes
Jul 22, 2019
Contributor
AthenaEryma
left a comment
There was a problem hiding this comment.
Thanks for fixing this. LGTM, with one very minor nitpick
| validator, IndexScopedSettings.DEFAULT_SCOPED_SETTINGS) { | ||
|
|
||
| @Override | ||
| protected void checkShardLimit(final Settings settings, final ClusterState clusterState) { |
Contributor
There was a problem hiding this comment.
Could we add a short comment here explaining why this is here?
Member
Author
|
@elasticmachine run elasticsearch-ci/bwc |
Member
Author
|
@elasticmachine run elasticsearch-ci/2 |
jasontedor
added a commit
that referenced
this pull request
Jul 23, 2019
Today when creating an index and checking cluster shard limits, we check the number of shards before applying index templates. At this point, we do not know the actual number of shards that will be used to create the index. In a case when the defaults are used and a template would override, we could be grossly underestimating the number of shards that would be created, and thus incorrectly applying the limits. This commit addresses this by checking the shard limits after applying index templates.
jasontedor
added a commit
that referenced
this pull request
Jul 23, 2019
Today when creating an index and checking cluster shard limits, we check the number of shards before applying index templates. At this point, we do not know the actual number of shards that will be used to create the index. In a case when the defaults are used and a template would override, we could be grossly underestimating the number of shards that would be created, and thus incorrectly applying the limits. This commit addresses this by checking the shard limits after applying index templates.
jasontedor
added a commit
that referenced
this pull request
Jul 23, 2019
Today when creating an index and checking cluster shard limits, we check the number of shards before applying index templates. At this point, we do not know the actual number of shards that will be used to create the index. In a case when the defaults are used and a template would override, we could be grossly underestimating the number of shards that would be created, and thus incorrectly applying the limits. This commit addresses this by checking the shard limits after applying index templates.
jasontedor
added a commit
that referenced
this pull request
Jul 23, 2019
Today when creating an index and checking cluster shard limits, we check the number of shards before applying index templates. At this point, we do not know the actual number of shards that will be used to create the index. In a case when the defaults are used and a template would override, we could be grossly underestimating the number of shards that would be created, and thus incorrectly applying the limits. This commit addresses this by checking the shard limits after applying index templates.
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.
Today when creating an index and checking cluster shard limits, we check the number of shards before applying index templates. At this point, we do not know the actual number of shards that will be used to create the index. In a case when the defaults are used and a template would override, we could be grossly underestimating the number of shards that would be created, and thus incorrectly applying the limits. This commit addresses this by checking the shard limits after applying index templates.
Closes #44567
Relates #34021
Supersedes #44619