Skip to content

Always enforce cluster-wide shard limit#34892

Merged
AthenaEryma merged 10 commits intoelastic:masterfrom
AthenaEryma:shardlimit/final
Nov 27, 2018
Merged

Always enforce cluster-wide shard limit#34892
AthenaEryma merged 10 commits intoelastic:masterfrom
AthenaEryma:shardlimit/final

Conversation

@AthenaEryma
Copy link
Copy Markdown
Contributor

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

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.
@AthenaEryma AthenaEryma added >enhancement >breaking :Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. v7.0.0 labels Oct 25, 2018
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra

Copy link
Copy Markdown
Member

@jasontedor jasontedor left a 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
Copy link
Copy Markdown
Member

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);
Copy link
Copy Markdown
Member

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);
Copy link
Copy Markdown
Member

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(
Copy link
Copy Markdown
Member

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?

@AthenaEryma
Copy link
Copy Markdown
Contributor Author

Thanks for the review @jasontedor!

@AthenaEryma
Copy link
Copy Markdown
Contributor Author

AthenaEryma commented Nov 26, 2018

The failure does not reproduce locally and appears to be unrelated.

@elasticmachine run the gradle build tests 2 please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>breaking :Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. >enhancement v7.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants