Skip to content

Commit 9ccb6dc

Browse files
shiv0408dk2k
authored andcommitted
Make Remote Publication a static setting (opensearch-project#15478)
* Make Remote Publication a static setting Signed-off-by: Shivansh Arora <[email protected]>
1 parent 6191e98 commit 9ccb6dc

File tree

13 files changed

+40
-58
lines changed

13 files changed

+40
-58
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5555
- Reset DiscoveryNodes in all transport node actions request ([#15131](https://github.com/opensearch-project/OpenSearch/pull/15131))
5656
- Adding WithFieldName interface for QueryBuilders with fieldName ([#15705](https://github.com/opensearch-project/OpenSearch/pull/15705))
5757
- Relax the join validation for Remote State publication ([#15471](https://github.com/opensearch-project/OpenSearch/pull/15471))
58+
- Static RemotePublication setting added, removed experimental feature flag ([#15478](https://github.com/opensearch-project/OpenSearch/pull/15478))
5859
- MultiTermQueries in keyword fields now default to `indexed` approach and gated behind cluster setting ([#15637](https://github.com/opensearch-project/OpenSearch/pull/15637))
5960
- Making _cat/allocation API use indexLevelStats ([#15292](https://github.com/opensearch-project/OpenSearch/pull/15292))
6061

server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteClusterStateCleanupManagerIT.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
import java.util.concurrent.TimeUnit;
3636
import java.util.concurrent.atomic.AtomicLong;
3737

38-
import static org.opensearch.common.util.FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL;
3938
import static org.opensearch.gateway.remote.RemoteClusterStateCleanupManager.CLUSTER_STATE_CLEANUP_INTERVAL_DEFAULT;
4039
import static org.opensearch.gateway.remote.RemoteClusterStateCleanupManager.REMOTE_CLUSTER_STATE_CLEANUP_INTERVAL_SETTING;
4140
import static org.opensearch.gateway.remote.RemoteClusterStateCleanupManager.RETAINED_MANIFESTS;
4241
import static org.opensearch.gateway.remote.RemoteClusterStateCleanupManager.SKIP_CLEANUP_STATE_CHANGES;
4342
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_CLUSTER_STATE_ENABLED_SETTING;
43+
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_PUBLICATION_SETTING_KEY;
4444
import static org.opensearch.gateway.remote.RemoteUploadStats.REMOTE_UPLOAD;
4545
import static org.opensearch.gateway.remote.routingtable.RemoteIndexRoutingTable.INDEX_ROUTING_TABLE;
4646
import static org.opensearch.indices.IndicesService.CLUSTER_DEFAULT_INDEX_REFRESH_INTERVAL_SETTING;
@@ -189,7 +189,7 @@ public void testRemoteCleanupDeleteStaleIndexRoutingFiles() throws Exception {
189189
RemoteStoreEnums.PathType.HASHED_PREFIX.toString()
190190
)
191191
.put("node.attr." + REMOTE_STORE_ROUTING_TABLE_REPOSITORY_NAME_ATTRIBUTE_KEY, REMOTE_ROUTING_TABLE_REPO)
192-
.put(REMOTE_PUBLICATION_EXPERIMENTAL, true);
192+
.put(REMOTE_PUBLICATION_SETTING_KEY, true);
193193

194194
int shardCount = randomIntBetween(1, 2);
195195
int replicaCount = 1;

server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteRoutingTableServiceIT.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
import java.util.concurrent.TimeUnit;
3838
import java.util.concurrent.atomic.AtomicInteger;
3939

40-
import static org.opensearch.common.util.FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL;
4140
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_CLUSTER_STATE_ENABLED_SETTING;
41+
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_PUBLICATION_SETTING_KEY;
4242
import static org.opensearch.gateway.remote.routingtable.RemoteIndexRoutingTable.INDEX_ROUTING_TABLE;
4343
import static org.opensearch.indices.IndicesService.CLUSTER_DEFAULT_INDEX_REFRESH_INTERVAL_SETTING;
4444
import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.REMOTE_STORE_ROUTING_TABLE_REPOSITORY_NAME_ATTRIBUTE_KEY;
@@ -66,7 +66,7 @@ protected Settings nodeSettings(int nodeOrdinal) {
6666
RemoteStoreEnums.PathType.HASHED_PREFIX.toString()
6767
)
6868
.put("node.attr." + REMOTE_STORE_ROUTING_TABLE_REPOSITORY_NAME_ATTRIBUTE_KEY, REMOTE_ROUTING_TABLE_REPO)
69-
.put(REMOTE_PUBLICATION_EXPERIMENTAL, true)
69+
.put(REMOTE_PUBLICATION_SETTING_KEY, true)
7070
.put(
7171
RemoteClusterStateService.REMOTE_CLUSTER_STATE_CHECKSUM_VALIDATION_MODE_SETTING.getKey(),
7272
RemoteClusterStateService.RemoteClusterStateValidationMode.FAILURE

server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteStatePublicationIT.java

+6-12
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
import static org.opensearch.action.admin.cluster.node.info.NodesInfoRequest.Metric.SETTINGS;
5050
import static org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest.Metric.DISCOVERY;
5151
import static org.opensearch.cluster.metadata.Metadata.isGlobalStateEquals;
52-
import static org.opensearch.common.util.FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL;
53-
import static org.opensearch.common.util.FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL_SETTING;
5452
import static org.opensearch.gateway.remote.RemoteClusterStateAttributesManager.DISCOVERY_NODES;
5553
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_CLUSTER_STATE_ENABLED_SETTING;
54+
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_PUBLICATION_SETTING;
55+
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_PUBLICATION_SETTING_KEY;
5656
import static org.opensearch.gateway.remote.RemoteClusterStateUtils.DELIMITER;
5757
import static org.opensearch.gateway.remote.model.RemoteClusterBlocks.CLUSTER_BLOCKS;
5858
import static org.opensearch.gateway.remote.model.RemoteCoordinationMetadata.COORDINATION_METADATA;
@@ -87,11 +87,6 @@ public void setup() {
8787
hasRemoteRoutingCharPrefix = randomBoolean();
8888
}
8989

90-
@Override
91-
protected Settings featureFlagSettings() {
92-
return Settings.builder().put(super.featureFlagSettings()).put(REMOTE_PUBLICATION_EXPERIMENTAL, isRemotePublicationEnabled).build();
93-
}
94-
9590
@Override
9691
protected Settings nodeSettings(int nodeOrdinal) {
9792
String routingTableRepoName = "remote-routing-repo";
@@ -109,6 +104,7 @@ protected Settings nodeSettings(int nodeOrdinal) {
109104
return Settings.builder()
110105
.put(super.nodeSettings(nodeOrdinal))
111106
.put(REMOTE_CLUSTER_STATE_ENABLED_SETTING.getKey(), isRemoteStateEnabled)
107+
.put(REMOTE_PUBLICATION_SETTING_KEY, isRemotePublicationEnabled)
112108
.put("node.attr." + REMOTE_STORE_ROUTING_TABLE_REPOSITORY_NAME_ATTRIBUTE_KEY, routingTableRepoName)
113109
.put(routingTableRepoTypeAttributeKey, ReloadableFsRepository.TYPE)
114110
.put(routingTableRepoSettingsAttributeKeyPrefix + "location", segmentRepoPath)
@@ -248,7 +244,7 @@ public void testRemotePublicationDisabledByRollingRestart() throws Exception {
248244
@Override
249245
public Settings onNodeStopped(String nodeName) {
250246
restartedMasters.add(nodeName);
251-
return Settings.builder().put(REMOTE_PUBLICATION_EXPERIMENTAL, false).build();
247+
return Settings.builder().put(REMOTE_PUBLICATION_SETTING_KEY, false).build();
252248
}
253249

254250
@Override
@@ -287,9 +283,7 @@ public void doAfterNodes(int n, Client client) {
287283
.addMetric(SETTINGS.metricName())
288284
.get();
289285
// if masterRestarted is true Publication Setting should be false, and vice versa
290-
assertTrue(
291-
REMOTE_PUBLICATION_EXPERIMENTAL_SETTING.get(nodesInfoResponse.getNodes().get(0).getSettings()) != activeCMRestarted
292-
);
286+
assertTrue(REMOTE_PUBLICATION_SETTING.get(nodesInfoResponse.getNodes().get(0).getSettings()) != activeCMRestarted);
293287

294288
followingCMs.forEach(node -> {
295289
PersistedStateRegistry registry = internalCluster().getInstance(PersistedStateRegistry.class, node);
@@ -336,7 +330,7 @@ public void doAfterNodes(int n, Client client) {
336330
.addMetric(SETTINGS.metricName())
337331
.get();
338332
// if masterRestarted is true Publication Setting should be false, and vice versa
339-
assertFalse(REMOTE_PUBLICATION_EXPERIMENTAL_SETTING.get(nodesInfoResponse.getNodes().get(0).getSettings()));
333+
assertFalse(REMOTE_PUBLICATION_SETTING.get(nodesInfoResponse.getNodes().get(0).getSettings()));
340334

341335
followingCMs.forEach(node -> {
342336
PersistedStateRegistry registry = internalCluster().getInstance(PersistedStateRegistry.class, node);

server/src/main/java/org/opensearch/cluster/coordination/CoordinationState.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import org.opensearch.cluster.metadata.Metadata;
4040
import org.opensearch.cluster.node.DiscoveryNode;
4141
import org.opensearch.common.settings.Settings;
42-
import org.opensearch.common.util.FeatureFlags;
4342
import org.opensearch.common.util.io.IOUtils;
4443

4544
import java.io.Closeable;
@@ -53,7 +52,7 @@
5352
import java.util.Set;
5453

5554
import static org.opensearch.cluster.coordination.Coordinator.ZEN1_BWC_TERM;
56-
import static org.opensearch.common.util.FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL;
55+
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_PUBLICATION_SETTING;
5756
import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.isRemoteStoreClusterStateEnabled;
5857

5958
/**
@@ -81,7 +80,7 @@ public class CoordinationState {
8180
private VotingConfiguration lastPublishedConfiguration;
8281
private VoteCollection publishVotes;
8382
private final boolean isRemoteStateEnabled;
84-
private final boolean isRemotePublicationEnabled;
83+
private boolean isRemotePublicationEnabled;
8584

8685
public CoordinationState(
8786
DiscoveryNode localNode,
@@ -106,7 +105,7 @@ public CoordinationState(
106105
this.publishVotes = new VoteCollection();
107106
this.isRemoteStateEnabled = isRemoteStoreClusterStateEnabled(settings);
108107
this.isRemotePublicationEnabled = isRemoteStateEnabled
109-
&& FeatureFlags.isEnabled(REMOTE_PUBLICATION_EXPERIMENTAL)
108+
&& REMOTE_PUBLICATION_SETTING.get(settings)
110109
&& localNode.isRemoteStatePublicationEnabled();
111110
}
112111

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

+1
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ public void apply(Settings value, Settings current, Settings previous) {
734734
// Remote cluster state settings
735735
RemoteClusterStateCleanupManager.REMOTE_CLUSTER_STATE_CLEANUP_INTERVAL_SETTING,
736736
RemoteClusterStateService.REMOTE_CLUSTER_STATE_ENABLED_SETTING,
737+
RemoteClusterStateService.REMOTE_PUBLICATION_SETTING,
737738
INDEX_METADATA_UPLOAD_TIMEOUT_SETTING,
738739
GLOBAL_METADATA_UPLOAD_TIMEOUT_SETTING,
739740
METADATA_MANIFEST_UPLOAD_TIMEOUT_SETTING,

server/src/main/java/org/opensearch/common/settings/FeatureFlagSettings.java

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ protected FeatureFlagSettings(
3737
FeatureFlags.TIERED_REMOTE_INDEX_SETTING,
3838
FeatureFlags.REMOTE_STORE_MIGRATION_EXPERIMENTAL_SETTING,
3939
FeatureFlags.PLUGGABLE_CACHE_SETTING,
40-
FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL_SETTING,
4140
FeatureFlags.STAR_TREE_INDEX_SETTING,
4241
FeatureFlags.APPLICATION_BASED_CONFIGURATION_TEMPLATES_SETTING,
4342
FeatureFlags.READER_WRITER_SPLIT_EXPERIMENTAL_SETTING

server/src/main/java/org/opensearch/common/util/FeatureFlags.java

-12
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ public class FeatureFlags {
6767
*/
6868
public static final String PLUGGABLE_CACHE = "opensearch.experimental.feature.pluggable.caching.enabled";
6969

70-
/**
71-
* Gates the functionality of remote routing table.
72-
*/
73-
public static final String REMOTE_PUBLICATION_EXPERIMENTAL = "opensearch.experimental.feature.remote_store.publication.enabled";
74-
7570
/**
7671
* Gates the functionality of background task execution.
7772
*/
@@ -101,12 +96,6 @@ public class FeatureFlags {
10196

10297
public static final Setting<Boolean> PLUGGABLE_CACHE_SETTING = Setting.boolSetting(PLUGGABLE_CACHE, false, Property.NodeScope);
10398

104-
public static final Setting<Boolean> REMOTE_PUBLICATION_EXPERIMENTAL_SETTING = Setting.boolSetting(
105-
REMOTE_PUBLICATION_EXPERIMENTAL,
106-
false,
107-
Property.NodeScope
108-
);
109-
11099
public static final Setting<Boolean> READER_WRITER_SPLIT_EXPERIMENTAL_SETTING = Setting.boolSetting(
111100
READER_WRITER_SPLIT_EXPERIMENTAL,
112101
false,
@@ -148,7 +137,6 @@ public class FeatureFlags {
148137
DATETIME_FORMATTER_CACHING_SETTING,
149138
TIERED_REMOTE_INDEX_SETTING,
150139
PLUGGABLE_CACHE_SETTING,
151-
REMOTE_PUBLICATION_EXPERIMENTAL_SETTING,
152140
STAR_TREE_INDEX_SETTING,
153141
APPLICATION_BASED_CONFIGURATION_TEMPLATES_SETTING,
154142
READER_WRITER_SPLIT_EXPERIMENTAL_SETTING

server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java

+13-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import org.opensearch.common.settings.Setting.Property;
4141
import org.opensearch.common.settings.Settings;
4242
import org.opensearch.common.unit.TimeValue;
43-
import org.opensearch.common.util.FeatureFlags;
4443
import org.opensearch.common.util.io.IOUtils;
4544
import org.opensearch.core.action.ActionListener;
4645
import org.opensearch.core.common.io.stream.NamedWriteableRegistry;
@@ -92,7 +91,6 @@
9291
import static java.util.Collections.emptyList;
9392
import static java.util.Collections.emptyMap;
9493
import static org.opensearch.cluster.ClusterState.CUSTOM_VALUE_SERIALIZER;
95-
import static org.opensearch.common.util.FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL;
9694
import static org.opensearch.gateway.PersistedClusterStateService.SLOW_WRITE_LOGGING_THRESHOLD;
9795
import static org.opensearch.gateway.remote.ClusterMetadataManifest.CODEC_V2;
9896
import static org.opensearch.gateway.remote.ClusterMetadataManifest.CODEC_V3;
@@ -123,6 +121,18 @@ public class RemoteClusterStateService implements Closeable {
123121

124122
private static final Logger logger = LogManager.getLogger(RemoteClusterStateService.class);
125123

124+
/**
125+
* Gates the functionality of remote publication.
126+
*/
127+
public static final String REMOTE_PUBLICATION_SETTING_KEY = "cluster.remote_store.publication.enabled";
128+
129+
public static final Setting<Boolean> REMOTE_PUBLICATION_SETTING = Setting.boolSetting(
130+
REMOTE_PUBLICATION_SETTING_KEY,
131+
false,
132+
Property.NodeScope,
133+
Property.Final
134+
);
135+
126136
/**
127137
* Used to specify if cluster state metadata should be published to remote store
128138
*/
@@ -260,7 +270,7 @@ public RemoteClusterStateService(
260270
this.remoteStateStats = new RemotePersistenceStats();
261271
this.namedWriteableRegistry = namedWriteableRegistry;
262272
this.indexMetadataUploadListeners = indexMetadataUploadListeners;
263-
this.isPublicationEnabled = FeatureFlags.isEnabled(REMOTE_PUBLICATION_EXPERIMENTAL)
273+
this.isPublicationEnabled = REMOTE_PUBLICATION_SETTING.get(settings)
264274
&& RemoteStoreNodeAttribute.isRemoteStoreClusterStateEnabled(settings)
265275
&& RemoteStoreNodeAttribute.isRemoteRoutingTableEnabled(settings);
266276
this.remotePathPrefix = CLUSTER_REMOTE_STORE_STATE_PATH_PREFIX.get(settings);

server/src/test/java/org/opensearch/cluster/coordination/CoordinationStateTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@
6666

6767
import static java.util.Collections.emptyMap;
6868
import static java.util.Collections.emptySet;
69-
import static org.opensearch.common.util.FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL;
7069
import static org.opensearch.gateway.remote.ClusterMetadataManifest.MANIFEST_CURRENT_CODEC_VERSION;
7170
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_CLUSTER_STATE_ENABLED_SETTING;
71+
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_PUBLICATION_SETTING_KEY;
7272
import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.REMOTE_STORE_CLUSTER_STATE_REPOSITORY_NAME_ATTRIBUTE_KEY;
7373
import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.REMOTE_STORE_REPOSITORY_SETTINGS_ATTRIBUTE_KEY_PREFIX;
7474
import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.REMOTE_STORE_REPOSITORY_TYPE_ATTRIBUTE_KEY_FORMAT;
@@ -1010,7 +1010,7 @@ public void testIsRemotePublicationEnabled_WithInconsistentSettings() {
10101010
// create settings with remote state disabled but publication enabled
10111011
Settings settings = Settings.builder()
10121012
.put(REMOTE_CLUSTER_STATE_ENABLED_SETTING.getKey(), false)
1013-
.put(REMOTE_PUBLICATION_EXPERIMENTAL, true)
1013+
.put(REMOTE_PUBLICATION_SETTING_KEY, true)
10141014
.build();
10151015
CoordinationState coordinationState = createCoordinationState(psr1, node1, settings);
10161016
assertFalse(coordinationState.isRemotePublicationEnabled());

server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceFactoryTests.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import org.opensearch.common.settings.ClusterSettings;
1212
import org.opensearch.common.settings.Settings;
13-
import org.opensearch.common.util.FeatureFlags;
1413
import org.opensearch.repositories.RepositoriesService;
1514
import org.opensearch.repositories.fs.FsRepository;
1615
import org.opensearch.test.OpenSearchTestCase;
@@ -20,7 +19,7 @@
2019

2120
import java.util.function.Supplier;
2221

23-
import static org.opensearch.common.util.FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL;
22+
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_PUBLICATION_SETTING_KEY;
2423
import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.REMOTE_STORE_ROUTING_TABLE_REPOSITORY_NAME_ATTRIBUTE_KEY;
2524

2625
public class RemoteRoutingTableServiceFactoryTests extends OpenSearchTestCase {
@@ -50,9 +49,8 @@ public void testGetServiceWhenRemoteRoutingEnabled() {
5049
Settings settings = Settings.builder()
5150
.put("node.attr." + REMOTE_STORE_ROUTING_TABLE_REPOSITORY_NAME_ATTRIBUTE_KEY, "routing_repository")
5251
.put(FsRepository.REPOSITORIES_COMPRESS_SETTING.getKey(), false)
52+
.put(REMOTE_PUBLICATION_SETTING_KEY, "true")
5353
.build();
54-
Settings nodeSettings = Settings.builder().put(REMOTE_PUBLICATION_EXPERIMENTAL, "true").build();
55-
FeatureFlags.initializeFeatureFlags(nodeSettings);
5654
RemoteRoutingTableService service = RemoteRoutingTableServiceFactory.getService(
5755
repositoriesService,
5856
settings,

server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceTests.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.opensearch.common.compress.DeflateCompressor;
2929
import org.opensearch.common.settings.ClusterSettings;
3030
import org.opensearch.common.settings.Settings;
31-
import org.opensearch.common.util.FeatureFlags;
3231
import org.opensearch.common.util.TestCapturingListener;
3332
import org.opensearch.core.action.ActionListener;
3433
import org.opensearch.core.compress.Compressor;
@@ -63,8 +62,8 @@
6362

6463
import org.mockito.Mockito;
6564

66-
import static org.opensearch.common.util.FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL;
6765
import static org.opensearch.gateway.remote.ClusterMetadataManifestTests.randomUploadedIndexMetadataList;
66+
import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_PUBLICATION_SETTING_KEY;
6867
import static org.opensearch.gateway.remote.RemoteClusterStateServiceTests.generateClusterStateWithOneIndex;
6968
import static org.opensearch.gateway.remote.RemoteClusterStateUtils.CLUSTER_STATE_PATH_TOKEN;
7069
import static org.opensearch.gateway.remote.RemoteClusterStateUtils.DELIMITER;
@@ -114,6 +113,7 @@ public void setup() {
114113

115114
Settings settings = Settings.builder()
116115
.put("node.attr." + REMOTE_STORE_ROUTING_TABLE_REPOSITORY_NAME_ATTRIBUTE_KEY, "routing_repository")
116+
.put(REMOTE_PUBLICATION_SETTING_KEY, "true")
117117
.build();
118118
clusterSettings = new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS);
119119
clusterService = mock(ClusterService.class);
@@ -126,8 +126,6 @@ public void setup() {
126126
when(repositoriesService.repository("routing_repository")).thenReturn(blobStoreRepository);
127127
when(blobStoreRepository.blobStore()).thenReturn(blobStore);
128128
when(blobStore.blobContainer(any())).thenReturn(blobContainer);
129-
Settings nodeSettings = Settings.builder().put(REMOTE_PUBLICATION_EXPERIMENTAL, "true").build();
130-
FeatureFlags.initializeFeatureFlags(nodeSettings);
131129
compressor = new NoneCompressor();
132130
basePath = BlobPath.cleanPath().add("base-path");
133131
when(blobStoreRepository.basePath()).thenReturn(basePath);

0 commit comments

Comments
 (0)