diff --git a/docs/reference/migration/migrate_7_0/settings.asciidoc b/docs/reference/migration/migrate_7_0/settings.asciidoc index 7826afc05fa..9fb875da382 100644 --- a/docs/reference/migration/migrate_7_0/settings.asciidoc +++ b/docs/reference/migration/migrate_7_0/settings.asciidoc @@ -40,3 +40,16 @@ will be removed in the future, thus requiring HTTP to always be enabled. This setting has been removed, as disabling http pipelining support on the server provided little value. The setting `http.pipelining.max_events` can still be used to limit the number of pipelined requests in-flight. + +==== Cross-cluster search settings renamed + +The cross-cluster search remote cluster connection infrastructure is also used +in cross-cluster replication. This means that the setting names +`search.remote.*` used for configuring cross-cluster search belie the fact that +they also apply to other situations where a connection to a remote cluster as +used. Therefore, these settings have been renamed from `search.remote.*` to +`cluster.remote.*`. For backwards compatibility purposes, we will fallback to +`search.remote.*` if `cluster.remote.*` is not set. For any such settings stored +in the cluster state, or set on dynamic settings updates, we will automatically +upgrade the setting from `search.remote.*` to `cluster.remote.*`. The fallback +settings will be removed in 8.0.0. diff --git a/server/src/main/java/org/elasticsearch/transport/RemoteClusterAware.java b/server/src/main/java/org/elasticsearch/transport/RemoteClusterAware.java index 1c87af4a442..f75d01a0233 100644 --- a/server/src/main/java/org/elasticsearch/transport/RemoteClusterAware.java +++ b/server/src/main/java/org/elasticsearch/transport/RemoteClusterAware.java @@ -52,6 +52,11 @@ import java.util.stream.Stream; */ public abstract class RemoteClusterAware extends AbstractComponent { + static { + // remove search.remote.* settings in 8.0.0 + assert Version.CURRENT.major < 8; + } + public static final Setting.AffixSetting> SEARCH_REMOTE_CLUSTERS_SEEDS = Setting.affixKeySetting( "search.remote.", diff --git a/server/src/main/java/org/elasticsearch/transport/RemoteClusterService.java b/server/src/main/java/org/elasticsearch/transport/RemoteClusterService.java index 04cb1ab3e56..75891ef820c 100644 --- a/server/src/main/java/org/elasticsearch/transport/RemoteClusterService.java +++ b/server/src/main/java/org/elasticsearch/transport/RemoteClusterService.java @@ -66,6 +66,11 @@ import static org.elasticsearch.common.settings.Setting.boolSetting; */ public final class RemoteClusterService extends RemoteClusterAware implements Closeable { + static { + // remove search.remote.* settings in 8.0.0 + assert Version.CURRENT.major < 8; + } + public static final Setting SEARCH_REMOTE_CONNECTIONS_PER_CLUSTER = Setting.intSetting("search.remote.connections_per_cluster", 3, 1, Setting.Property.NodeScope, Setting.Property.Deprecated);