Skip to content

Commit

Permalink
[test] Disable index.shard.check_on_startup for searchable snapshot t…
Browse files Browse the repository at this point in the history
…ests (#105731)



This setting requires expensive processing due to verification the integrity of many important files during a shard recovery or relocation.

Therefore, it takes lots of time for the files to clean up and the assertShardFolder check may not complete in 30s.

Fixes #105202
  • Loading branch information
arteam authored Mar 5, 2024
1 parent 61b3d98 commit fbbfbd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ public void testCreateAndRestorePartialSearchableSnapshot() throws Exception {
// we can bypass this by forcing soft deletes to be used. TODO this restriction can be lifted when #55142 is resolved.
final Settings.Builder originalIndexSettings = Settings.builder().put(INDEX_SOFT_DELETES_SETTING.getKey(), true);
if (randomBoolean()) {
originalIndexSettings.put(IndexSettings.INDEX_CHECK_ON_STARTUP.getKey(), randomFrom("false", "true", "checksum"));
// INDEX_CHECK_ON_STARTUP requires expensive processing due to verification the integrity of many important files during
// a shard recovery or relocation. Therefore, it takes lots of time for the files to clean up and the assertShardFolder
// check may not complete in 30s.
originalIndexSettings.put(IndexSettings.INDEX_CHECK_ON_STARTUP.getKey(), "false");
}
assertAcked(prepareCreate(indexName, originalIndexSettings));
assertAcked(indicesAdmin().prepareAliases().addAlias(indexName, aliasName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void testCreateAndRestoreSearchableSnapshot() throws Exception {
// we can bypass this by forcing soft deletes to be used. TODO this restriction can be lifted when #55142 is resolved.
final Settings.Builder originalIndexSettings = Settings.builder().put(INDEX_SOFT_DELETES_SETTING.getKey(), true);
if (randomBoolean()) {
originalIndexSettings.put(IndexSettings.INDEX_CHECK_ON_STARTUP.getKey(), randomFrom("false", "true", "checksum"));
originalIndexSettings.put(IndexSettings.INDEX_CHECK_ON_STARTUP.getKey(), "false");
}
assertAcked(prepareCreate(indexName, originalIndexSettings));
assertAcked(indicesAdmin().prepareAliases().addAlias(indexName, aliasName));
Expand Down

0 comments on commit fbbfbd5

Please sign in to comment.