Skip to content

Commit 45bd3f3

Browse files
authored
ILM mount snapshot step does need to set index.shard.check_on_startup (elastic#74288)
Now the Mount API overrides the index.shard.check_on_startup setting value to false, there's no need for MountSnapshotStep to set it explicitly. Backport of elastic#74283 Relates elastic#74235
1 parent 3ec3182 commit 45bd3f3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/MountSnapshotStep.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.elasticsearch.cluster.metadata.IndexMetadata;
1616
import org.elasticsearch.common.Strings;
1717
import org.elasticsearch.common.settings.Settings;
18-
import org.elasticsearch.index.IndexSettings;
1918
import org.elasticsearch.rest.RestStatus;
2019
import org.elasticsearch.xpack.cluster.routing.allocation.DataTierAllocationDecider;
2120
import org.elasticsearch.xpack.core.DataTier;
@@ -103,8 +102,7 @@ void performDuringNoSnapshot(IndexMetadata indexMetadata, ClusterState currentCl
103102
indexName = snapshotIndexName;
104103
}
105104

106-
Settings.Builder settingsBuilder = Settings.builder();
107-
settingsBuilder.put(IndexSettings.INDEX_CHECK_ON_STARTUP.getKey(), Boolean.FALSE.toString());
105+
final Settings.Builder settingsBuilder = Settings.builder();
108106
// if we are mounting a searchable snapshot in the hot phase, then the index should be pinned to the hot nodes
109107
if (TimeseriesLifecycleType.HOT_PHASE.equals(this.getKey().getPhase())) {
110108
settingsBuilder.put(DataTierAllocationDecider.INDEX_ROUTING_PREFER, DataTier.DATA_HOT);

0 commit comments

Comments
 (0)