From 77b90157da6617d70134cda34f902314d3d0a4b6 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 6 Dec 2024 12:37:31 -0800 Subject: [PATCH 1/5] Remove client.type setting The client.type setting is a holdover from the node client which was removed in 8.0. The setting has been a noop since 8.0. This commit removes the setting. relates #104574 --- .../java/org/elasticsearch/client/internal/Client.java | 10 +--------- .../elasticsearch/common/settings/ClusterSettings.java | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/client/internal/Client.java b/server/src/main/java/org/elasticsearch/client/internal/Client.java index 4158bbfb27cda..ff47cd37a78a9 100644 --- a/server/src/main/java/org/elasticsearch/client/internal/Client.java +++ b/server/src/main/java/org/elasticsearch/client/internal/Client.java @@ -73,15 +73,7 @@ * @see org.elasticsearch.node.Node#client() */ public interface Client extends ElasticsearchClient { - - // Note: This setting is registered only for bwc. The value is never read. - Setting CLIENT_TYPE_SETTING_S = new Setting<>("client.type", "node", (s) -> { - return switch (s) { - case "node", "transport" -> s; - default -> throw new IllegalArgumentException("Can't parse [client.type] must be one of [node, transport]"); - }; - }, Property.NodeScope, Property.Deprecated); - + /** * The admin client that can be used to perform administrative operations. */ diff --git a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java index a9a9411de8e1f..da08e8c33b675 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java +++ b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java @@ -483,7 +483,6 @@ public void apply(Settings value, Settings current, Settings previous) { AutoCreateIndex.AUTO_CREATE_INDEX_SETTING, BaseRestHandler.MULTI_ALLOW_EXPLICIT_INDEX, ClusterName.CLUSTER_NAME_SETTING, - Client.CLIENT_TYPE_SETTING_S, ClusterModule.SHARDS_ALLOCATOR_TYPE_SETTING, EsExecutors.NODE_PROCESSORS_SETTING, ThreadContext.DEFAULT_HEADERS_SETTING, From 3ae66a91b5038d336f1c2fb64c50ecfce2f173c3 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 6 Dec 2024 12:42:33 -0800 Subject: [PATCH 2/5] Update docs/changelog/118192.yaml --- docs/changelog/118192.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/changelog/118192.yaml diff --git a/docs/changelog/118192.yaml b/docs/changelog/118192.yaml new file mode 100644 index 0000000000000..0be4b15507ea0 --- /dev/null +++ b/docs/changelog/118192.yaml @@ -0,0 +1,12 @@ +pr: 118192 +summary: Remove `client.type` setting +area: Infra/Core +type: breaking +issues: [] +breaking: + title: Remove `client.type` setting + area: Infra/Core + details: Please describe the details of this change for the release notes. You can + use asciidoc. + impact: Please describe the impact of this change to users + notable: false From 0fb16269adf0883816bff1ec6b7b531d406d9c9c Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 6 Dec 2024 12:54:39 -0800 Subject: [PATCH 3/5] update release notes --- docs/changelog/118192.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/changelog/118192.yaml b/docs/changelog/118192.yaml index 0be4b15507ea0..f97de783f8184 100644 --- a/docs/changelog/118192.yaml +++ b/docs/changelog/118192.yaml @@ -2,11 +2,10 @@ pr: 118192 summary: Remove `client.type` setting area: Infra/Core type: breaking -issues: [] +issues: [104574] breaking: title: Remove `client.type` setting area: Infra/Core - details: Please describe the details of this change for the release notes. You can - use asciidoc. - impact: Please describe the impact of this change to users + details: The node setting `client.type` has been ignored since the node client was removed in 8.0. The setting is now removed. + impact: Remove the `client.type` setting from `elasticsearch.yml` notable: false From 50285490cdaaa8e653546b16c6c599422adca80c Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 6 Dec 2024 15:14:25 -0800 Subject: [PATCH 4/5] spotless --- .../main/java/org/elasticsearch/client/internal/Client.java | 4 +--- .../org/elasticsearch/common/settings/ClusterSettings.java | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/client/internal/Client.java b/server/src/main/java/org/elasticsearch/client/internal/Client.java index ff47cd37a78a9..2d1cbe0cce7f7 100644 --- a/server/src/main/java/org/elasticsearch/client/internal/Client.java +++ b/server/src/main/java/org/elasticsearch/client/internal/Client.java @@ -52,8 +52,6 @@ import org.elasticsearch.action.update.UpdateRequest; import org.elasticsearch.action.update.UpdateRequestBuilder; import org.elasticsearch.action.update.UpdateResponse; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.core.Nullable; import org.elasticsearch.transport.RemoteClusterService; @@ -73,7 +71,7 @@ * @see org.elasticsearch.node.Node#client() */ public interface Client extends ElasticsearchClient { - + /** * The admin client that can be used to perform administrative operations. */ diff --git a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java index da08e8c33b675..16af7ca2915d4 100644 --- a/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java +++ b/server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java @@ -20,7 +20,6 @@ import org.elasticsearch.action.support.DestructiveOperations; import org.elasticsearch.action.support.replication.TransportReplicationAction; import org.elasticsearch.bootstrap.BootstrapSettings; -import org.elasticsearch.client.internal.Client; import org.elasticsearch.cluster.ClusterModule; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.InternalClusterInfoService; From c8c637544ba77d30193db3008c8e9971d405d9d2 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 6 Dec 2024 15:27:48 -0800 Subject: [PATCH 5/5] changelog --- docs/changelog/118192.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog/118192.yaml b/docs/changelog/118192.yaml index f97de783f8184..03542048761d3 100644 --- a/docs/changelog/118192.yaml +++ b/docs/changelog/118192.yaml @@ -5,7 +5,7 @@ type: breaking issues: [104574] breaking: title: Remove `client.type` setting - area: Infra/Core + area: Cluster and node setting details: The node setting `client.type` has been ignored since the node client was removed in 8.0. The setting is now removed. impact: Remove the `client.type` setting from `elasticsearch.yml` notable: false