Skip to content

Commit

Permalink
[7.x] Fix SearchableSnapshotsPersistentCacheIntegTests.testPersistent…
Browse files Browse the repository at this point in the history
…CacheCleanUpAfterRelocation (#73207)

On 7.x the test should always use soft deletes because
peer recovery always copies .liv files but searchable
snapshot directories do not support writing files.

Relates #55142
Closes #72857
  • Loading branch information
tlrx authored May 19, 2021
1 parent 77b8473 commit 3627275
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ public Settings onNodeStopped(String nodeName) {
});
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/72857")
public void testPersistentCacheCleanUpAfterRelocation() throws Exception {
internalCluster().startMasterOnlyNode();
internalCluster().ensureAtLeastNumDataNodes(3);
Expand All @@ -179,6 +178,7 @@ public void testPersistentCacheCleanUpAfterRelocation() throws Exception {
Settings.builder()
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 3)
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, randomIntBetween(0, 1))
.put(INDEX_SOFT_DELETES_SETTING.getKey(), true)
);

final String snapshotName = prefix + "snapshot";
Expand All @@ -190,6 +190,7 @@ public void testPersistentCacheCleanUpAfterRelocation() throws Exception {

assertExecutorIsIdle(SearchableSnapshotsConstants.CACHE_FETCH_ASYNC_THREAD_POOL_NAME);
assertExecutorIsIdle(SearchableSnapshotsConstants.CACHE_PREWARMING_THREAD_POOL_NAME);
waitForRelocation();

RecoveryResponse recoveryResponse = client().admin().indices().prepareRecoveries(mountedIndexName).get();
assertTrue(recoveryResponse.shardRecoveryStates().containsKey(mountedIndexName));
Expand Down

0 comments on commit 3627275

Please sign in to comment.