Переглянути джерело

Add migration note for remote cluster settings (#33632)

The remote cluster settings search.remote.* have been renamed to
cluster.remote.* and are automatically upgraded in the cluster state on
gateway recovery, and on put. This commit adds a note to the migration
docs for these changes.
Jason Tedor 7 роки тому
батько
коміт
c023f67c5d

+ 13 - 0
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.

+ 5 - 0
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<List<String>> SEARCH_REMOTE_CLUSTERS_SEEDS =
             Setting.affixKeySetting(
                     "search.remote.",

+ 5 - 0
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<Integer> SEARCH_REMOTE_CONNECTIONS_PER_CLUSTER =
             Setting.intSetting("search.remote.connections_per_cluster", 3, 1, Setting.Property.NodeScope, Setting.Property.Deprecated);