Skip to content

Commit 3c323e2

Browse files
Added Warm setting and Updated nomenclature to differentiate between current tiering implementation for warm and upcoming hot implementation
commit 9cdec49 Author: Mayank Sharma <[email protected]> Date: Thu Mar 6 18:04:16 2025 +0530 Updated nomenclature to differentiate between current tiering implementation for warm and upcoming hot implementation commit 5552edd Author: Mayank Sharma <[email protected]> Date: Thu Mar 6 16:38:38 2025 +0530 Empty commit to rerun flaky test Signed-off-by: Mayank Sharma <[email protected]> commit d18bd6e Author: Mayank Sharma <[email protected]> Date: Thu Mar 6 14:25:33 2025 +0530 Ran spotlessapply Signed-off-by: Mayank Sharma <[email protected]> commit d5ac854 Author: Mayank Sharma <[email protected]> Date: Wed Mar 5 19:59:05 2025 +0530 Empty commit to rerun flaky test Signed-off-by: Mayank Sharma <[email protected]> commit 44000ee Author: Mayank Sharma <[email protected]> Date: Wed Mar 5 19:17:00 2025 +0530 Fixed failing UTs for ShardsTieringAllocationTests Signed-off-by: Mayank Sharma <[email protected]> commit 03a9305 Author: Mayank Sharma <[email protected]> Date: Wed Mar 5 17:54:33 2025 +0530 Empty commit to rerun flaky test Signed-off-by: Mayank Sharma <[email protected]> commit 795936a Author: Mayank Sharma <[email protected]> Date: Wed Mar 5 12:10:18 2025 +0530 Updated settings from "index.is.warm" to "index.warm" as part of PR comments opensearch-project#17490 Signed-off-by: Mayank Sharma <[email protected]> commit 724b934 Author: Mayank Sharma <[email protected]> Date: Tue Mar 4 17:09:19 2025 +0530 Addressed comments for PR opensearch-project#17490 Signed-off-by: Mayank Sharma <[email protected]> commit f1a249f Author: Mayank Sharma <[email protected]> Date: Fri Feb 28 19:02:24 2025 +0530 Updated nomenclature to differentiate between current tiering implementation for warm and upcoming hot implementation Signed-off-by: Mayank Sharma <[email protected]> Signed-off-by: Mayank Sharma <[email protected]> Signed-off-by: Mayank Sharma <[email protected]>
1 parent 3966ed9 commit 3c323e2

File tree

17 files changed

+64
-45
lines changed

17 files changed

+64
-45
lines changed

CHANGELOG-3.0.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2525
- Add filter function for AbstractQueryBuilder, BoolQueryBuilder, ConstantScoreQueryBuilder([#17409](https://github.com/opensearch-project/OpenSearch/pull/17409))
2626
- [Star Tree] [Search] Resolving keyword & numeric bucket aggregation with metric aggregation using star-tree ([#17165](https://github.com/opensearch-project/OpenSearch/pull/17165))
2727
- Added error handling support for the pull-based ingestion ([#17427](https://github.com/opensearch-project/OpenSearch/pull/17427))
28+
- Added Warm index setting and Updated nomenclature to differentiate between hot and warm tiering implementation ([#17490](https://github.com/opensearch-project/OpenSearch/pull/17490))
2829

2930

3031
### Dependencies

server/src/internalClusterTest/java/org/opensearch/remotestore/WritableWarmIT.java

+10-6
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected boolean addMockIndexStorePlugin() {
6363
@Override
6464
protected Settings featureFlagSettings() {
6565
Settings.Builder featureSettings = Settings.builder();
66-
featureSettings.put(FeatureFlags.TIERED_REMOTE_INDEX, true);
66+
featureSettings.put(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG, true);
6767
return featureSettings.build();
6868
}
6969

@@ -77,15 +77,19 @@ protected Settings nodeSettings(int nodeOrdinal) {
7777
}
7878

7979
public void testWritableWarmFeatureFlagDisabled() {
80-
Settings clusterSettings = Settings.builder().put(super.nodeSettings(0)).put(FeatureFlags.TIERED_REMOTE_INDEX, false).build();
80+
Settings clusterSettings = Settings.builder()
81+
.put(super.nodeSettings(0))
82+
.put(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG, false)
83+
.build();
84+
8185
InternalTestCluster internalTestCluster = internalCluster();
8286
internalTestCluster.startClusterManagerOnlyNode(clusterSettings);
8387
internalTestCluster.startDataAndSearchNodes(1);
8488

8589
Settings indexSettings = Settings.builder()
8690
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
8791
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
88-
.put(IndexModule.INDEX_STORE_LOCALITY_SETTING.getKey(), IndexModule.DataLocalityType.PARTIAL.name())
92+
.put(IndexModule.IS_WARM_INDEX_SETTING.getKey(), false)
8993
.build();
9094

9195
try {
@@ -94,7 +98,7 @@ public void testWritableWarmFeatureFlagDisabled() {
9498
} catch (SettingsException ex) {
9599
assertEquals(
96100
"unknown setting ["
97-
+ IndexModule.INDEX_STORE_LOCALITY_SETTING.getKey()
101+
+ IndexModule.IS_WARM_INDEX_SETTING.getKey()
98102
+ "] please check that any required plugins are installed, or check the "
99103
+ "breaking changes documentation for removed settings",
100104
ex.getMessage()
@@ -109,7 +113,7 @@ public void testWritableWarmBasic() throws Exception {
109113
Settings settings = Settings.builder()
110114
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
111115
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
112-
.put(IndexModule.INDEX_STORE_LOCALITY_SETTING.getKey(), IndexModule.DataLocalityType.PARTIAL.name())
116+
.put(IndexModule.IS_WARM_INDEX_SETTING.getKey(), true)
113117
.build();
114118
assertAcked(client().admin().indices().prepareCreate(INDEX_NAME).setSettings(settings).get());
115119

@@ -119,7 +123,7 @@ public void testWritableWarmBasic() throws Exception {
119123
.getIndex(new GetIndexRequest().indices(INDEX_NAME).includeDefaults(true))
120124
.get();
121125
Settings indexSettings = getIndexResponse.settings().get(INDEX_NAME);
122-
assertEquals(IndexModule.DataLocalityType.PARTIAL.name(), indexSettings.get(IndexModule.INDEX_STORE_LOCALITY_SETTING.getKey()));
126+
assertTrue(indexSettings.getAsBoolean(IndexModule.IS_WARM_INDEX_SETTING.getKey(), false));
123127

124128
// Ingesting some docs
125129
indexBulk(INDEX_NAME, NUM_DOCS_IN_BULK);

server/src/main/java/org/opensearch/action/ActionModule.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ public <Request extends ActionRequest, Response extends ActionResponse> void reg
654654
actions.register(CreateSnapshotAction.INSTANCE, TransportCreateSnapshotAction.class);
655655
actions.register(CloneSnapshotAction.INSTANCE, TransportCloneSnapshotAction.class);
656656
actions.register(RestoreSnapshotAction.INSTANCE, TransportRestoreSnapshotAction.class);
657-
if (FeatureFlags.isEnabled(FeatureFlags.TIERED_REMOTE_INDEX)) {
657+
if (FeatureFlags.isEnabled(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG)) {
658658
actions.register(HotToWarmTieringAction.INSTANCE, TransportHotToWarmTieringAction.class);
659659
}
660660
actions.register(SnapshotsStatusAction.INSTANCE, TransportSnapshotsStatusAction.class);
@@ -996,7 +996,7 @@ public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
996996
registerHandler.accept(new RestNodeAttrsAction());
997997
registerHandler.accept(new RestRepositoriesAction());
998998
registerHandler.accept(new RestSnapshotAction());
999-
if (FeatureFlags.isEnabled(FeatureFlags.TIERED_REMOTE_INDEX)) {
999+
if (FeatureFlags.isEnabled(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG)) {
10001000
registerHandler.accept(new RestWarmTieringAction());
10011001
}
10021002
registerHandler.accept(new RestTemplatesAction());

server/src/main/java/org/opensearch/action/admin/indices/tiering/TieringUtils.java

+8-9
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,25 @@ public class TieringUtils {
2222

2323
/**
2424
* Checks if the specified shard is a partial shard by
25-
* checking the INDEX_STORE_LOCALITY_SETTING for its index.
26-
* see {@link #isPartialIndex(IndexMetadata)}
25+
* checking the WARM_INDEX_ENABLED_SETTING for its index.
26+
* see {@link #isWarmIndex(IndexMetadata)} (IndexMetadata)}
2727
* @param shard ShardRouting object representing the shard
2828
* @param allocation RoutingAllocation object representing the allocation
2929
* @return true if the shard is a partial shard, false otherwise
3030
*/
3131
public static boolean isPartialShard(ShardRouting shard, RoutingAllocation allocation) {
3232
IndexMetadata indexMetadata = allocation.metadata().getIndexSafe(shard.index());
33-
return isPartialIndex(indexMetadata);
33+
return isWarmIndex(indexMetadata);
3434
}
3535

3636
/**
37-
* Checks if the specified index is a partial index by
38-
* checking the INDEX_STORE_LOCALITY_SETTING for the index.
37+
* Checks if the specified index is a warm index by
38+
* checking the WARM_INDEX_ENABLED_SETTING for the index.
3939
*
4040
* @param indexMetadata the metadata of the index
41-
* @return true if the index is a partial index, false otherwise
41+
* @return true if the index is a warm index, false otherwise
4242
*/
43-
public static boolean isPartialIndex(final IndexMetadata indexMetadata) {
44-
return IndexModule.DataLocalityType.PARTIAL.name()
45-
.equals(indexMetadata.getSettings().get(IndexModule.INDEX_STORE_LOCALITY_SETTING.getKey()));
43+
public static boolean isWarmIndex(final IndexMetadata indexMetadata) {
44+
return indexMetadata.getSettings().getAsBoolean(IndexModule.IS_WARM_INDEX_SETTING.getKey(), false);
4645
}
4746
}

server/src/main/java/org/opensearch/cluster/routing/OperationRouting.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public GroupShardsIterator<ShardIterator> searchShards(
256256
preference = Preference.PRIMARY.type();
257257
}
258258

259-
if (FeatureFlags.isEnabled(FeatureFlags.TIERED_REMOTE_INDEX)
259+
if (FeatureFlags.isEnabled(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG)
260260
&& IndexModule.DataLocalityType.PARTIAL.name()
261261
.equals(indexMetadataForShard.getSettings().get(IndexModule.INDEX_STORE_LOCALITY_SETTING.getKey()))
262262
&& (preference == null || preference.isEmpty())) {

server/src/main/java/org/opensearch/cluster/routing/RoutingPool.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import org.opensearch.cluster.routing.allocation.RoutingAllocation;
1414
import org.opensearch.common.util.FeatureFlags;
1515

16-
import static org.opensearch.action.admin.indices.tiering.TieringUtils.isPartialIndex;
16+
import static org.opensearch.action.admin.indices.tiering.TieringUtils.isWarmIndex;
1717

1818
/**
1919
* {@link RoutingPool} defines the different node types based on the assigned capabilities. The methods
@@ -62,6 +62,9 @@ public static RoutingPool getShardPool(ShardRouting shard, RoutingAllocation all
6262
*/
6363
public static RoutingPool getIndexPool(IndexMetadata indexMetadata) {
6464
return indexMetadata.isRemoteSnapshot()
65-
|| (FeatureFlags.isEnabled(FeatureFlags.TIERED_REMOTE_INDEX) && isPartialIndex(indexMetadata)) ? REMOTE_CAPABLE : LOCAL_ONLY;
65+
|| (FeatureFlags.isEnabled(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG) && isWarmIndex(indexMetadata))
66+
? REMOTE_CAPABLE
67+
: LOCAL_ONLY;
68+
6669
}
6770
}

server/src/main/java/org/opensearch/cluster/routing/allocation/allocator/LocalShardsBalancer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ private void checkAndAddInEligibleTargetNode(RoutingNode targetNode) {
561561
*/
562562
private boolean canShardBeSkipped(ShardRouting shardRouting) {
563563
return (RoutingPool.REMOTE_CAPABLE.equals(RoutingPool.getShardPool(shardRouting, allocation))
564-
&& !(FeatureFlags.isEnabled(FeatureFlags.TIERED_REMOTE_INDEX) && isPartialShard(shardRouting, allocation)));
564+
&& !(FeatureFlags.isEnabled(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG) && isPartialShard(shardRouting, allocation)));
565565
}
566566

567567
/**
@@ -771,7 +771,7 @@ private Map<String, BalancedShardsAllocator.ModelNode> buildModelFromAssigned()
771771
assert rn.nodeId().equals(shard.currentNodeId());
772772
/* we skip relocating shards here since we expect an initializing shard with the same id coming in */
773773
if ((RoutingPool.LOCAL_ONLY.equals(RoutingPool.getShardPool(shard, allocation))
774-
|| (FeatureFlags.isEnabled(FeatureFlags.TIERED_REMOTE_INDEX) && isPartialShard(shard, allocation)))
774+
|| (FeatureFlags.isEnabled(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG) && isPartialShard(shard, allocation)))
775775
&& shard.state() != RELOCATING) {
776776
node.addShard(shard);
777777
++totalShardCount;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected FeatureFlagSettings(
3333
FeatureFlags.EXTENSIONS_SETTING,
3434
FeatureFlags.TELEMETRY_SETTING,
3535
FeatureFlags.DATETIME_FORMATTER_CACHING_SETTING,
36-
FeatureFlags.TIERED_REMOTE_INDEX_SETTING,
36+
FeatureFlags.WRITABLE_WARM_INDEX_SETTING,
3737
FeatureFlags.REMOTE_STORE_MIGRATION_EXPERIMENTAL_SETTING,
3838
FeatureFlags.PLUGGABLE_CACHE_SETTING,
3939
FeatureFlags.STAR_TREE_INDEX_SETTING,

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,9 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
291291
* setting should be moved to {@link #BUILT_IN_INDEX_SETTINGS}.
292292
*/
293293
public static final Map<String, List<Setting>> FEATURE_FLAGGED_INDEX_SETTINGS = Map.of(
294-
FeatureFlags.TIERED_REMOTE_INDEX,
295-
List.of(IndexModule.INDEX_STORE_LOCALITY_SETTING, IndexModule.INDEX_TIERING_STATE),
294+
FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG,
295+
// TODO: Create a separate feature flag for hot tiering index state.
296+
List.of(IndexModule.INDEX_STORE_LOCALITY_SETTING, IndexModule.INDEX_TIERING_STATE, IndexModule.IS_WARM_INDEX_SETTING),
296297
FeatureFlags.READER_WRITER_SPLIT_EXPERIMENTAL,
297298
List.of(IndexMetadata.INDEX_NUMBER_OF_SEARCH_REPLICAS_SETTING)
298299
);

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ public class FeatureFlags {
5151
public static final String DATETIME_FORMATTER_CACHING = "opensearch.experimental.optimization.datetime_formatter_caching.enabled";
5252

5353
/**
54-
* Gates the functionality of remote index having the capability to move across different tiers
54+
* Gates the functionality of warm index having the capability to store data remotely.
5555
* Once the feature is ready for release, this feature flag can be removed.
5656
*/
57-
public static final String TIERED_REMOTE_INDEX = "opensearch.experimental.feature.tiered_remote_index.enabled";
57+
public static final String WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG = "opensearch.experimental.feature.writable_warm_index.enabled";
5858

5959
/**
6060
* Gates the functionality of pluggable cache.
@@ -85,7 +85,11 @@ public class FeatureFlags {
8585
Property.NodeScope
8686
);
8787

88-
public static final Setting<Boolean> TIERED_REMOTE_INDEX_SETTING = Setting.boolSetting(TIERED_REMOTE_INDEX, false, Property.NodeScope);
88+
public static final Setting<Boolean> WRITABLE_WARM_INDEX_SETTING = Setting.boolSetting(
89+
WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG,
90+
false,
91+
Property.NodeScope
92+
);
8993

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

@@ -136,7 +140,7 @@ public class FeatureFlags {
136140
EXTENSIONS_SETTING,
137141
TELEMETRY_SETTING,
138142
DATETIME_FORMATTER_CACHING_SETTING,
139-
TIERED_REMOTE_INDEX_SETTING,
143+
WRITABLE_WARM_INDEX_SETTING,
140144
PLUGGABLE_CACHE_SETTING,
141145
STAR_TREE_INDEX_SETTING,
142146
APPLICATION_BASED_CONFIGURATION_TEMPLATES_SETTING,

server/src/main/java/org/opensearch/index/IndexModule.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public final class IndexModule {
145145
);
146146

147147
/**
148-
* Index setting which used to determine how the data is cached locally fully or partially
148+
* Index setting which used to determine how the data is cached locally fully or partially.
149149
*/
150150
public static final Setting<DataLocalityType> INDEX_STORE_LOCALITY_SETTING = new Setting<>(
151151
"index.store.data_locality",
@@ -155,6 +155,8 @@ public final class IndexModule {
155155
Property.NodeScope
156156
);
157157

158+
public static final Setting<Boolean> IS_WARM_INDEX_SETTING = Setting.boolSetting("index.warm", false, Property.IndexScope);
159+
158160
public static final Setting<String> INDEX_RECOVERY_TYPE_SETTING = new Setting<>(
159161
"index.recovery.type",
160162
"",

server/src/main/java/org/opensearch/index/IndexService.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,9 @@ protected void closeInternal() {
652652
}
653653

654654
Directory directory = null;
655-
if (FeatureFlags.isEnabled(FeatureFlags.TIERED_REMOTE_INDEX_SETTING) &&
655+
if (FeatureFlags.isEnabled(FeatureFlags.WRITABLE_WARM_INDEX_SETTING) &&
656656
// TODO : Need to remove this check after support for hot indices is added in Composite Directory
657-
this.indexSettings.isStoreLocalityPartial()) {
657+
this.indexSettings.isWarmIndex()) {
658658
Directory localDirectory = directoryFactory.newDirectory(this.indexSettings, path);
659659
directory = new CompositeDirectory(localDirectory, remoteDirectory, fileCache);
660660
} else {

server/src/main/java/org/opensearch/index/IndexSettings.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ public static IndexMergePolicy fromString(String text) {
790790
private final int numberOfShards;
791791
private final ReplicationType replicationType;
792792
private volatile boolean isRemoteStoreEnabled;
793-
private final boolean isStoreLocalityPartial;
793+
// For warm index we would partially store files in local.
794+
private final boolean isWarmIndex;
794795
private volatile TimeValue remoteTranslogUploadBufferInterval;
795796
private volatile String remoteStoreTranslogRepository;
796797
private volatile String remoteStoreRepository;
@@ -994,10 +995,9 @@ public IndexSettings(final IndexMetadata indexMetadata, final Settings nodeSetti
994995
numberOfShards = settings.getAsInt(IndexMetadata.SETTING_NUMBER_OF_SHARDS, null);
995996
replicationType = IndexMetadata.INDEX_REPLICATION_TYPE_SETTING.get(settings);
996997
isRemoteStoreEnabled = settings.getAsBoolean(IndexMetadata.SETTING_REMOTE_STORE_ENABLED, false);
997-
isStoreLocalityPartial = settings.get(
998-
IndexModule.INDEX_STORE_LOCALITY_SETTING.getKey(),
999-
IndexModule.DataLocalityType.FULL.toString()
1000-
).equalsIgnoreCase(IndexModule.DataLocalityType.PARTIAL.toString());
998+
999+
isWarmIndex = settings.getAsBoolean(IndexModule.IS_WARM_INDEX_SETTING.getKey(), false);
1000+
10011001
remoteStoreTranslogRepository = settings.get(IndexMetadata.SETTING_REMOTE_TRANSLOG_STORE_REPOSITORY);
10021002
remoteTranslogUploadBufferInterval = INDEX_REMOTE_TRANSLOG_BUFFER_INTERVAL_SETTING.get(settings);
10031003
remoteStoreRepository = settings.get(IndexMetadata.SETTING_REMOTE_SEGMENT_STORE_REPOSITORY);
@@ -1372,10 +1372,10 @@ public String getRemoteStoreTranslogRepository() {
13721372
}
13731373

13741374
/**
1375-
* Returns true if the store locality is partial
1375+
* Returns true if the index is writable warm index and has partial store locality.
13761376
*/
1377-
public boolean isStoreLocalityPartial() {
1378-
return isStoreLocalityPartial;
1377+
public boolean isWarmIndex() {
1378+
return isWarmIndex;
13791379
}
13801380

13811381
/**

server/src/test/java/org/opensearch/action/admin/indices/tiering/TransportHotToWarmTieringActionTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class TransportHotToWarmTieringActionTests extends OpenSearchIntegTestCas
4444
@Override
4545
protected Settings featureFlagSettings() {
4646
Settings.Builder featureSettings = Settings.builder();
47-
featureSettings.put(FeatureFlags.TIERED_REMOTE_INDEX, true);
47+
featureSettings.put(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG, true);
4848
return featureSettings.build();
4949
}
5050

server/src/test/java/org/opensearch/cluster/routing/OperationRoutingTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ public void testSearchableSnapshotPrimaryDefault() throws Exception {
10601060

10611061
@SuppressForbidden(reason = "feature flag overrides")
10621062
public void testPartialIndexPrimaryDefault() throws Exception {
1063-
System.setProperty(FeatureFlags.TIERED_REMOTE_INDEX, "true");
1063+
System.setProperty(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG, "true");
10641064
final int numIndices = 1;
10651065
final int numShards = 2;
10661066
final int numReplicas = 2;
@@ -1116,7 +1116,7 @@ public void testPartialIndexPrimaryDefault() throws Exception {
11161116
} finally {
11171117
IOUtils.close(clusterService);
11181118
terminate(threadPool);
1119-
System.setProperty(FeatureFlags.TIERED_REMOTE_INDEX, "false");
1119+
System.setProperty(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG, "false");
11201120
}
11211121
}
11221122

server/src/test/java/org/opensearch/cluster/routing/allocation/ShardsTieringAllocationTests.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class ShardsTieringAllocationTests extends TieringAllocationBaseTestCase
2929

3030
@Before
3131
public void setup() {
32-
FeatureFlagSetter.set(FeatureFlags.TIERED_REMOTE_INDEX);
32+
FeatureFlagSetter.set(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG);
3333
}
3434

3535
public void testShardsInLocalPool() {
@@ -107,7 +107,10 @@ public void testShardsWithTiering() {
107107
public void testShardPoolForPartialIndices() {
108108
String index = "test-index";
109109
IndexMetadata indexMetadata = IndexMetadata.builder(index)
110-
.settings(settings(Version.CURRENT).put(INDEX_STORE_LOCALITY_SETTING.getKey(), IndexModule.DataLocalityType.PARTIAL.name()))
110+
.settings(
111+
settings(Version.CURRENT).put(INDEX_STORE_LOCALITY_SETTING.getKey(), IndexModule.DataLocalityType.PARTIAL.name())
112+
.put(IndexModule.IS_WARM_INDEX_SETTING.getKey(), true)
113+
)
111114
.numberOfShards(PRIMARIES)
112115
.numberOfReplicas(REPLICAS)
113116
.build();

server/src/test/java/org/opensearch/cluster/routing/allocation/TieringAllocationBaseTestCase.java

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.opensearch.cluster.metadata.Metadata;
1414
import org.opensearch.common.SuppressForbidden;
1515
import org.opensearch.common.settings.Settings;
16+
import org.opensearch.index.IndexModule;
1617

1718
import static org.opensearch.index.IndexModule.INDEX_STORE_LOCALITY_SETTING;
1819
import static org.opensearch.index.IndexModule.INDEX_TIERING_STATE;
@@ -37,6 +38,7 @@ public ClusterState updateIndexMetadataForTiering(
3738
.put(settings)
3839
.put(settings)
3940
.put(INDEX_TIERING_STATE.getKey(), tieringState)
41+
.put(IndexModule.IS_WARM_INDEX_SETTING.getKey(), true)
4042
.put(INDEX_STORE_LOCALITY_SETTING.getKey(), dataLocality)
4143
)
4244
);

0 commit comments

Comments
 (0)