-
Couldn't load subscription status.
- Fork 25.6k
ILM mount snapshot step does need to set index.shard.check_on_startup #74283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
|
Pinging @elastic/es-distributed (Team:Distributed) |
|
Pinging @elastic/es-core-features (Team:Core/Features) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggested a different way to fix the test.
| } else { | ||
| expectedReplicas = 0; | ||
| } | ||
| final String indexCheckOnStartup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be better to keep this code and fix the assertion so that we're covering more things:
diff --git a/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/FrozenSearchableSnapshotsIntegTests.java b/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/FrozenSearchableSnapshotsIntegTests.java
index 5c1688ed1e1..17daeef5895 100644
--- a/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/FrozenSearchableSnapshotsIntegTests.java
+++ b/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/FrozenSearchableSnapshotsIntegTests.java
@@ -291,7 +291,7 @@ public class FrozenSearchableSnapshotsIntegTests extends BaseFrozenSearchableSna
assertThat(DataTierAllocationDecider.INDEX_ROUTING_PREFER_SETTING.get(settings), equalTo(expectedDataTiersPreference));
assertTrue(SearchableSnapshotsConstants.SNAPSHOT_PARTIAL_SETTING.get(settings));
assertTrue(DiskThresholdDecider.SETTING_IGNORE_DISK_WATERMARKS.get(settings));
- assertThat(IndexSettings.INDEX_CHECK_ON_STARTUP.get(settings), equalTo("false"));
+ assertThat(IndexSettings.INDEX_CHECK_ON_STARTUP.get(settings), equalTo(indexCheckOnStartup));
checkSoftDeletesNotEagerlyLoaded(restoredIndexName);
assertTotalHits(restoredIndexName, originalAllHits, originalBarHits);There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, as you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Thanks David |
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
Now the Mount API overrides the index.shard.check_on_startup
setting value to
false, there's no need for MountSnapshotStepto set it explicitly.
This commit also fixes a failing test where some leftover code
was overriding the setting value.
Relates #74235