Skip to content

Commit c41ab0b

Browse files
committed
Remove search.remote.* fallback and upgraders
Fallback settings were introduced in elastic#33413 where the `search.remote.*` settings were generalized to `cluster.remote.*`. This commit removes both the fallback settings and the upgraders that were introduced in elastic#33537
1 parent 3bf8e24 commit c41ab0b

File tree

9 files changed

+30
-462
lines changed

9 files changed

+30
-462
lines changed

qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java

+4-23
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.elasticsearch.client.Response;
2727
import org.elasticsearch.client.ResponseException;
2828
import org.elasticsearch.client.RestClient;
29-
import org.elasticsearch.client.WarningFailureException;
3029
import org.elasticsearch.client.WarningsHandler;
3130
import org.elasticsearch.cluster.metadata.IndexMetaData;
3231
import org.elasticsearch.common.Booleans;
@@ -69,7 +68,6 @@
6968
import static org.hamcrest.Matchers.greaterThan;
7069
import static org.hamcrest.Matchers.hasSize;
7170
import static org.hamcrest.Matchers.notNullValue;
72-
import static org.hamcrest.Matchers.startsWith;
7371

7472
/**
7573
* Tests to run before and after a full cluster restart. This is run twice,
@@ -1055,27 +1053,10 @@ private void checkSnapshot(String snapshotName, int count, Version tookOnVersion
10551053
assertEquals(singletonList(tookOnVersion.toString()), XContentMapValues.extractValue("snapshots.version", listSnapshotResponse));
10561054

10571055
// Remove the routing setting and template so we can test restoring them.
1058-
try {
1059-
Request clearRoutingFromSettings = new Request("PUT", "/_cluster/settings");
1060-
clearRoutingFromSettings.setJsonEntity("{\"persistent\":{\"cluster.routing.allocation.exclude.test_attr\": null}}");
1061-
client().performRequest(clearRoutingFromSettings);
1062-
} catch (WarningFailureException e) {
1063-
/*
1064-
* If this test is executed on the upgraded mode before testRemoteClusterSettingsUpgraded,
1065-
* we will hit a warning exception because we put some deprecated settings in that test.
1066-
*/
1067-
if (isRunningAgainstOldCluster() == false
1068-
&& getOldClusterVersion().onOrAfter(Version.V_6_1_0) && getOldClusterVersion().before(Version.V_6_5_0)) {
1069-
for (String warning : e.getResponse().getWarnings()) {
1070-
assertThat(warning, containsString(
1071-
"setting was deprecated in Elasticsearch and will be removed in a future release! "
1072-
+ "See the breaking changes documentation for the next major version."));
1073-
assertThat(warning, startsWith("[search.remote."));
1074-
}
1075-
} else {
1076-
throw e;
1077-
}
1078-
}
1056+
1057+
Request clearRoutingFromSettings = new Request("PUT", "/_cluster/settings");
1058+
clearRoutingFromSettings.setJsonEntity("{\"persistent\":{\"cluster.routing.allocation.exclude.test_attr\": null}}");
1059+
client().performRequest(clearRoutingFromSettings);
10791060
client().performRequest(new Request("DELETE", "/_template/test_template"));
10801061

10811062
// Restore

qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartSettingsUpgradeIT.java

-102
This file was deleted.

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

+1-11
Original file line numberDiff line numberDiff line change
@@ -295,19 +295,12 @@ public void apply(Settings value, Settings current, Settings previous) {
295295
ElectMasterService.DISCOVERY_ZEN_MINIMUM_MASTER_NODES_SETTING,
296296
TransportSearchAction.SHARD_COUNT_LIMIT_SETTING,
297297
RemoteClusterAware.REMOTE_CLUSTERS_SEEDS,
298-
RemoteClusterAware.SEARCH_REMOTE_CLUSTERS_SEEDS,
299298
RemoteClusterAware.REMOTE_CLUSTERS_PROXY,
300-
RemoteClusterAware.SEARCH_REMOTE_CLUSTERS_PROXY,
301299
RemoteClusterService.REMOTE_CLUSTER_SKIP_UNAVAILABLE,
302-
RemoteClusterService.SEARCH_REMOTE_CLUSTER_SKIP_UNAVAILABLE,
303300
RemoteClusterService.REMOTE_CONNECTIONS_PER_CLUSTER,
304-
RemoteClusterService.SEARCH_REMOTE_CONNECTIONS_PER_CLUSTER,
305301
RemoteClusterService.REMOTE_INITIAL_CONNECTION_TIMEOUT_SETTING,
306-
RemoteClusterService.SEARCH_REMOTE_INITIAL_CONNECTION_TIMEOUT_SETTING,
307302
RemoteClusterService.REMOTE_NODE_ATTRIBUTE,
308-
RemoteClusterService.SEARCH_REMOTE_NODE_ATTRIBUTE,
309303
RemoteClusterService.ENABLE_REMOTE_CLUSTERS,
310-
RemoteClusterService.SEARCH_ENABLE_REMOTE_CLUSTERS,
311304
RemoteClusterService.REMOTE_CLUSTER_PING_SCHEDULE,
312305
RemoteClusterService.REMOTE_CLUSTER_COMPRESS,
313306
TransportCloseIndexAction.CLUSTER_INDICES_CLOSE_ENABLE_SETTING,
@@ -498,9 +491,6 @@ public void apply(Settings value, Settings current, Settings previous) {
498491
DiscoveryUpgradeService.ENABLE_UNSAFE_BOOTSTRAPPING_ON_UPGRADE_SETTING
499492
)));
500493

501-
public static List<SettingUpgrader<?>> BUILT_IN_SETTING_UPGRADERS = Collections.unmodifiableList(Arrays.asList(
502-
RemoteClusterAware.SEARCH_REMOTE_CLUSTER_SEEDS_UPGRADER,
503-
RemoteClusterAware.SEARCH_REMOTE_CLUSTERS_PROXY_UPGRADER,
504-
RemoteClusterService.SEARCH_REMOTE_CLUSTER_SKIP_UNAVAILABLE_UPGRADER));
494+
public static List<SettingUpgrader<?>> BUILT_IN_SETTING_UPGRADERS = Collections.emptyList();
505495

506496
}

0 commit comments

Comments
 (0)