Skip to content

Commit e27cf58

Browse files
Added warm settings and updated nomenclature to differentiate between current tiering implementation for warm and upcoming hot implementation (#17490)
Signed-off-by: Mayank Sharma <[email protected]>
1 parent f224a6d commit e27cf58

File tree

22 files changed

+72
-53
lines changed

22 files changed

+72
-53
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/indices/replication/WarmIndexSegmentReplicationIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ protected Settings nodeSettings(int nodeOrdinal) {
150150
@Override
151151
protected Settings featureFlagSettings() {
152152
Settings.Builder featureSettings = Settings.builder();
153-
featureSettings.put(FeatureFlags.TIERED_REMOTE_INDEX, true);
153+
featureSettings.put(FeatureFlags.WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG, true);
154154
return featureSettings.build();
155155
}
156156

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/cluster/routing/allocation/allocator/RemoteShardsBalancer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import java.util.Queue;
3434
import java.util.Set;
3535

36-
import static org.opensearch.action.admin.indices.tiering.TieringUtils.isPartialIndex;
36+
import static org.opensearch.action.admin.indices.tiering.TieringUtils.isWarmIndex;
3737

3838
/**
3939
* A {@link RemoteShardsBalancer} used by the {@link BalancedShardsAllocator} to perform allocation operations
@@ -348,7 +348,7 @@ private void unassignIgnoredRemoteShards(RoutingAllocation routingAllocation) {
348348
// to re-fetch any shard blocks from the repository.
349349
if (shard.primary()) {
350350
if (RecoverySource.Type.SNAPSHOT.equals(shard.recoverySource().getType()) == false
351-
&& isPartialIndex(allocation.metadata().getIndexSafe(shard.index())) == false) {
351+
&& isWarmIndex(allocation.metadata().getIndexSafe(shard.index())) == false) {
352352
unassignedShard = shard.updateUnassigned(shard.unassignedInfo(), RecoverySource.EmptyStoreRecoverySource.INSTANCE);
353353
}
354354
}

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.STAR_TREE_INDEX_SETTING,
3939
FeatureFlags.APPLICATION_BASED_CONFIGURATION_TEMPLATES_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 background task execution.
@@ -79,7 +79,11 @@ public class FeatureFlags {
7979
Property.NodeScope
8080
);
8181

82-
public static final Setting<Boolean> TIERED_REMOTE_INDEX_SETTING = Setting.boolSetting(TIERED_REMOTE_INDEX, false, Property.NodeScope);
82+
public static final Setting<Boolean> WRITABLE_WARM_INDEX_SETTING = Setting.boolSetting(
83+
WRITABLE_WARM_INDEX_EXPERIMENTAL_FLAG,
84+
false,
85+
Property.NodeScope
86+
);
8387

8488
public static final Setting<Boolean> READER_WRITER_SPLIT_EXPERIMENTAL_SETTING = Setting.boolSetting(
8589
READER_WRITER_SPLIT_EXPERIMENTAL,
@@ -128,7 +132,7 @@ public class FeatureFlags {
128132
EXTENSIONS_SETTING,
129133
TELEMETRY_SETTING,
130134
DATETIME_FORMATTER_CACHING_SETTING,
131-
TIERED_REMOTE_INDEX_SETTING,
135+
WRITABLE_WARM_INDEX_SETTING,
132136
STAR_TREE_INDEX_SETTING,
133137
APPLICATION_BASED_CONFIGURATION_TEMPLATES_SETTING,
134138
READER_WRITER_SPLIT_EXPERIMENTAL_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/main/java/org/opensearch/index/engine/NRTReplicationEngine.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public void flush(boolean force, boolean waitIfOngoing) throws EngineException {
370370
ensureOpen();
371371
// Skip flushing for indices with partial locality (warm indices)
372372
// For these indices, we don't need to commit as we will sync from the remote store on re-open
373-
if (engineConfig.getIndexSettings().isStoreLocalityPartial()) {
373+
if (engineConfig.getIndexSettings().isWarmIndex()) {
374374
return;
375375
}
376376
// readLock is held here to wait/block any concurrent close that acquires the writeLock.
@@ -447,7 +447,7 @@ protected final void closeNoLock(String reason, CountDownLatch closedLatch) {
447447
latestSegmentInfos.changed();
448448
}
449449
try {
450-
if (engineConfig.getIndexSettings().isStoreLocalityPartial() == false) {
450+
if (engineConfig.getIndexSettings().isWarmIndex() == false) {
451451
commitSegmentInfos(latestSegmentInfos);
452452
}
453453
} catch (IOException e) {

server/src/main/java/org/opensearch/index/shard/IndexShard.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -5142,7 +5142,7 @@ public void syncSegmentsFromRemoteSegmentStore(boolean overrideLocal, final Runn
51425142
} else {
51435143
storeDirectory = store.directory();
51445144
}
5145-
if (indexSettings.isStoreLocalityPartial() == false) {
5145+
if (indexSettings.isWarmIndex() == false) {
51465146
copySegmentFiles(storeDirectory, remoteDirectory, null, uploadedSegments, overrideLocal, onFileSync);
51475147
}
51485148

@@ -5160,7 +5160,7 @@ public void syncSegmentsFromRemoteSegmentStore(boolean overrideLocal, final Runn
51605160
}
51615161
}
51625162
assert Arrays.stream(store.directory().listAll()).filter(f -> f.startsWith(IndexFileNames.SEGMENTS)).findAny().isEmpty()
5163-
|| indexSettings.isStoreLocalityPartial() : "There should not be any segments file in the dir";
5163+
|| indexSettings.isWarmIndex() : "There should not be any segments file in the dir";
51645164
store.commitSegmentInfos(infosSnapshot, processedLocalCheckpoint, processedLocalCheckpoint);
51655165
}
51665166
syncSegmentSuccess = true;

0 commit comments

Comments
 (0)