Skip to content

Commit 513985e

Browse files
authored
Remove the cluster.remote.connect setting (#54175)
In Elasticsearch 7.7.0, the setting cluster.remote.connect was deprecated. In this commit, we remote the setting permanently in favor of setting node.remote_cluster_client.
1 parent 53c6278 commit 513985e

File tree

5 files changed

+5
-28
lines changed

5 files changed

+5
-28
lines changed

docs/reference/migration/migrate_8_0/settings.asciidoc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@ threads, the `node.processors` setting is now bounded by the number of available
3939
processors.
4040

4141
[float]
42-
==== `cluster.remote.connect` is deprecated in favor of `node.remote_cluster_client`
42+
==== `cluster.remote.connect` is removed
4343

44-
Previously the setting `cluster.remote.connect` was used to configure whether or
45-
not the local node is capable of acting as a remote cluster client in
46-
cross-cluster search and cross-cluster replication. This setting is deprecated
47-
in favor of `node.remote_cluster_client` serves the same purpose and identifies
48-
the local node as having the `remote_cluster_client` role.
44+
In Elasticsearch 7.7.0, the setting `cluster.remote.connect` was deprecated in
45+
favor of setting `node.remote_cluster_client`. In Elasticsearch 8.0.0, the
46+
setting `cluster.remote.connect` is removed.

server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ public void apply(Settings value, Settings current, Settings previous) {
294294
SniffConnectionStrategy.REMOTE_CONNECTIONS_PER_CLUSTER,
295295
RemoteClusterService.REMOTE_INITIAL_CONNECTION_TIMEOUT_SETTING,
296296
RemoteClusterService.REMOTE_NODE_ATTRIBUTE,
297-
RemoteClusterService.ENABLE_REMOTE_CLUSTERS,
298297
RemoteClusterService.REMOTE_CLUSTER_PING_SCHEDULE,
299298
RemoteClusterService.REMOTE_CLUSTER_COMPRESS,
300299
RemoteConnectionStrategy.REMOTE_CONNECTION_MODE,

server/src/main/java/org/elasticsearch/node/Node.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@
155155
import org.elasticsearch.tasks.TaskResultsService;
156156
import org.elasticsearch.threadpool.ExecutorBuilder;
157157
import org.elasticsearch.threadpool.ThreadPool;
158-
import org.elasticsearch.transport.RemoteClusterService;
159158
import org.elasticsearch.transport.Transport;
160159
import org.elasticsearch.transport.TransportInterceptor;
161160
import org.elasticsearch.transport.TransportService;
@@ -202,7 +201,7 @@ public class Node implements Closeable {
202201
public static final Setting<Boolean> NODE_INGEST_SETTING =
203202
Setting.boolSetting("node.ingest", true, Property.NodeScope);
204203
public static final Setting<Boolean> NODE_REMOTE_CLUSTER_CLIENT =
205-
Setting.boolSetting("node.remote_cluster_client", RemoteClusterService.ENABLE_REMOTE_CLUSTERS, Property.NodeScope);
204+
Setting.boolSetting("node.remote_cluster_client", true, Property.NodeScope);
206205

207206
/**
208207
* controls whether the node is allowed to persist things like metadata to disk

server/src/main/java/org/elasticsearch/transport/RemoteClusterService.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,6 @@ public final class RemoteClusterService extends RemoteClusterAware implements Cl
8484
public static final Setting<String> REMOTE_NODE_ATTRIBUTE =
8585
Setting.simpleString("cluster.remote.node.attr", Setting.Property.NodeScope);
8686

87-
/**
88-
* If <code>true</code> connecting to remote clusters is supported on this node. If <code>false</code> this node will not establish
89-
* connections to any remote clusters configured. Search requests executed against this node (where this node is the coordinating node)
90-
* will fail if remote cluster syntax is used as an index pattern. The default is <code>true</code>
91-
*/
92-
public static final Setting<Boolean> ENABLE_REMOTE_CLUSTERS =
93-
Setting.boolSetting(
94-
"cluster.remote.connect",
95-
true,
96-
Setting.Property.Deprecated,
97-
Setting.Property.NodeScope);
98-
9987
public static final Setting.AffixSetting<Boolean> REMOTE_CLUSTER_SKIP_UNAVAILABLE =
10088
Setting.affixKeySetting(
10189
"cluster.remote.",

server/src/test/java/org/elasticsearch/transport/RemoteClusterSettingsTests.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919

2020
package org.elasticsearch.transport;
2121

22-
import org.elasticsearch.common.settings.Setting;
2322
import org.elasticsearch.common.settings.Settings;
2423
import org.elasticsearch.common.unit.TimeValue;
2524
import org.elasticsearch.test.ESTestCase;
2625

2726
import java.util.concurrent.TimeUnit;
2827

2928
import static org.elasticsearch.node.Node.NODE_REMOTE_CLUSTER_CLIENT;
30-
import static org.elasticsearch.transport.RemoteClusterService.ENABLE_REMOTE_CLUSTERS;
3129
import static org.elasticsearch.transport.RemoteClusterService.REMOTE_CLUSTER_SKIP_UNAVAILABLE;
3230
import static org.elasticsearch.transport.RemoteClusterService.REMOTE_INITIAL_CONNECTION_TIMEOUT_SETTING;
3331
import static org.elasticsearch.transport.RemoteClusterService.REMOTE_NODE_ATTRIBUTE;
@@ -59,11 +57,6 @@ public void testDisableRemoteClusterClient() {
5957
assertFalse(NODE_REMOTE_CLUSTER_CLIENT.get(Settings.builder().put(NODE_REMOTE_CLUSTER_CLIENT.getKey(), false).build()));
6058
}
6159

62-
public void testDisableEnableRemoteClusters() {
63-
assertFalse(NODE_REMOTE_CLUSTER_CLIENT.get(Settings.builder().put(ENABLE_REMOTE_CLUSTERS.getKey(), false).build()));
64-
assertSettingDeprecationsAndWarnings(new Setting<?>[]{ENABLE_REMOTE_CLUSTERS});
65-
}
66-
6760
public void testSkipUnavailableDefault() {
6861
final String alias = randomAlphaOfLength(8);
6962
assertFalse(REMOTE_CLUSTER_SKIP_UNAVAILABLE.getConcreteSettingForNamespace(alias).get(Settings.EMPTY));

0 commit comments

Comments
 (0)