-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Always enforce cluster-wide shard limit #34892
Conversation
This removes the option to run a cluster without enforcing the cluster-wide shard limit, making strict enforcement the default and only behavior. The limit can still be adjusted as desired using the cluster settings API.
Pinging @elastic/es-core-infra |
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.
I am so sorry @gwbrown for the delay in reviewing. This is looking really great! I left a few incredibly minor nits. No need for another round.
Elasticsearch 7.0, as strict enforcement of the limit will be the default and | ||
only behavior. | ||
There is a soft limit on the number of shards in a cluster, based on the number | ||
of nodes in the cluster. This is intended to prevent operations which may |
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.
Nit: a single space is fine; the CSS/HTML ensures consistent style anyway.
|
||
dataNodes = ensureMultipleDataNodes(dataNodes); | ||
|
||
int firstShardCount = between(2,10); |
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.
Nit: space after the comma
int firstIndexShards = firstIndexFactor * dataNodes; | ||
int firstIndexReplicas = 0; | ||
|
||
int secondIndexFactor = between(1,3); |
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.
Nit: space after comma
@@ -29,7 +29,7 @@ private DeprecationChecks() { | |||
|
|||
static List<Function<ClusterState, DeprecationIssue>> CLUSTER_SETTINGS_CHECKS = | |||
Collections.unmodifiableList(Arrays.asList( |
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.
Collections.emptyList is unmodifiable too?
Thanks for the review @jasontedor! |
The failure does not reproduce locally and appears to be unrelated. @elasticmachine run the gradle build tests 2 please |
This removes the option to run a cluster without enforcing the
cluster-wide shard limit, making strict enforcement the default and only
behavior. The limit can still be adjusted as desired using the cluster
settings API.
This is a follow-up to #34021
Closes #20705