From 52f5acdfaaf641ef6e9f7ad2b9b53c44518c8ac6 Mon Sep 17 00:00:00 2001 From: Stef Nestor <26751266+stefnestor@users.noreply.github.com> Date: Wed, 17 Jul 2024 11:54:06 -0600 Subject: [PATCH] (Err>Doc) Max Shards Per Node --- .../org/elasticsearch/cluster/shards/ClusterShardLimitIT.java | 4 +++- .../src/main/java/org/elasticsearch/common/ReferenceDocs.java | 1 + .../org/elasticsearch/common/reference-docs-links.json | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java b/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java index 3202f5513e9ac..a2415ec3d74ca 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java @@ -17,6 +17,7 @@ import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.Metadata; import org.elasticsearch.common.Priority; +import org.elasticsearch.common.ReferenceDocs; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.ByteSizeUnit; import org.elasticsearch.index.IndexVersion; @@ -152,7 +153,8 @@ public void testIncreaseReplicasOverLimit() { + firstShardCount + "]/[" + dataNodes * shardsPerNode - + "] maximum normal shards open;"; + + "] maximum normal shards open; for more information see " + + ReferenceDocs.MAX_SHARDS_PER_NODE; assertEquals(expectedError, e.getMessage()); } Metadata clusterState = clusterAdmin().prepareState().get().getState().metadata(); diff --git a/server/src/main/java/org/elasticsearch/common/ReferenceDocs.java b/server/src/main/java/org/elasticsearch/common/ReferenceDocs.java index 65225530b7d38..a87f3b3d4bda0 100644 --- a/server/src/main/java/org/elasticsearch/common/ReferenceDocs.java +++ b/server/src/main/java/org/elasticsearch/common/ReferenceDocs.java @@ -78,6 +78,7 @@ public enum ReferenceDocs { SNAPSHOT_REPOSITORY_ANALYSIS, S3_COMPATIBLE_REPOSITORIES, LUCENE_MAX_DOCS_LIMIT, + MAX_SHARDS_PER_NODE, // this comment keeps the ';' on the next line so every entry above has a trailing ',' which makes the diff for adding new links cleaner ; diff --git a/server/src/main/resources/org/elasticsearch/common/reference-docs-links.json b/server/src/main/resources/org/elasticsearch/common/reference-docs-links.json index cd325ce9010ac..d4fb1be58d854 100644 --- a/server/src/main/resources/org/elasticsearch/common/reference-docs-links.json +++ b/server/src/main/resources/org/elasticsearch/common/reference-docs-links.json @@ -38,5 +38,6 @@ "NETWORK_BINDING_AND_PUBLISHING": "modules-network.html#modules-network-binding-publishing", "SNAPSHOT_REPOSITORY_ANALYSIS": "repo-analysis-api.html", "S3_COMPATIBLE_REPOSITORIES": "repository-s3.html#repository-s3-compatible-services", - "LUCENE_MAX_DOCS_LIMIT": "size-your-shards.html#troubleshooting-max-docs-limit" + "LUCENE_MAX_DOCS_LIMIT": "size-your-shards.html#troubleshooting-max-docs-limit", + "MAX_SHARDS_PER_NODE": "size-your-shards.html#_this_action_would_add_x_total_shards_but_this_cluster_currently_has_yz_maximum_shards_open" }