Skip to content

Commit e4713d5

Browse files
committed
[7.x] Fix SearchableSnapshotsPersistentCacheIntegTests.testPersistentCacheCleanUpAfterRelocation
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 elastic#55142 Closes elastic#72857
1 parent 3fc0897 commit e4713d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/cache/full/SearchableSnapshotsPersistentCacheIntegTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ public Settings onNodeStopped(String nodeName) {
162162
});
163163
}
164164

165-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/72857")
166165
public void testPersistentCacheCleanUpAfterRelocation() throws Exception {
167166
internalCluster().startMasterOnlyNode();
168167
internalCluster().ensureAtLeastNumDataNodes(3);
@@ -179,6 +178,7 @@ public void testPersistentCacheCleanUpAfterRelocation() throws Exception {
179178
Settings.builder()
180179
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 3)
181180
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, randomIntBetween(0, 1))
181+
.put(INDEX_SOFT_DELETES_SETTING.getKey(), true)
182182
);
183183

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

191191
assertExecutorIsIdle(SearchableSnapshotsConstants.CACHE_FETCH_ASYNC_THREAD_POOL_NAME);
192192
assertExecutorIsIdle(SearchableSnapshotsConstants.CACHE_PREWARMING_THREAD_POOL_NAME);
193+
waitForRelocation();
193194

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

0 commit comments

Comments
 (0)