From 456ff51602872a2270b1d0ff0950c60f676e1406 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Fri, 18 Jun 2021 11:42:35 +0200 Subject: [PATCH] ILM mount snapshot step does need to set index.shard.check_on_startup 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 #74283 Relates #74235 --- .../org/elasticsearch/xpack/core/ilm/MountSnapshotStep.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/MountSnapshotStep.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/MountSnapshotStep.java index 5ae746a77f082..be7ce9e35eb05 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/MountSnapshotStep.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/MountSnapshotStep.java @@ -15,7 +15,6 @@ import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.common.Strings; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.IndexSettings; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.xpack.cluster.routing.allocation.DataTierAllocationDecider; import org.elasticsearch.xpack.core.DataTier; @@ -103,8 +102,7 @@ void performDuringNoSnapshot(IndexMetadata indexMetadata, ClusterState currentCl indexName = snapshotIndexName; } - Settings.Builder settingsBuilder = Settings.builder(); - settingsBuilder.put(IndexSettings.INDEX_CHECK_ON_STARTUP.getKey(), Boolean.FALSE.toString()); + final Settings.Builder settingsBuilder = Settings.builder(); // if we are mounting a searchable snapshot in the hot phase, then the index should be pinned to the hot nodes if (TimeseriesLifecycleType.HOT_PHASE.equals(this.getKey().getPhase())) { settingsBuilder.put(DataTierAllocationDecider.INDEX_ROUTING_PREFER, DataTier.DATA_HOT);