|
@@ -66,6 +66,7 @@ import org.elasticsearch.snapshots.SnapshotInfo;
|
|
|
import org.elasticsearch.test.ESIntegTestCase;
|
|
|
import org.elasticsearch.test.InternalSettingsPlugin;
|
|
|
import org.elasticsearch.test.MockLogAppender;
|
|
|
+import org.elasticsearch.test.junit.annotations.TestIssueLogging;
|
|
|
import org.elasticsearch.test.junit.annotations.TestLogging;
|
|
|
import org.elasticsearch.test.transport.MockTransportService;
|
|
|
import org.elasticsearch.threadpool.ThreadPool;
|
|
@@ -664,6 +665,10 @@ public class SnapshotBasedIndexRecoveryIT extends AbstractSnapshotIntegTestCase
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @TestIssueLogging(
|
|
|
+ issueUrl = "https://github.com/elastic/elasticsearch/issues/96618",
|
|
|
+ value = "org.elasticsearch.indices.recovery:TRACE,org.elasticsearch.xpack.snapshotbasedrecoveries:TRACE"
|
|
|
+ )
|
|
|
public void testCancelledRecoveryAbortsDownloadPromptly() throws Exception {
|
|
|
updateSetting(INDICES_RECOVERY_MAX_CONCURRENT_SNAPSHOT_FILE_DOWNLOADS.getKey(), "1");
|
|
|
|
|
@@ -673,7 +678,11 @@ public class SnapshotBasedIndexRecoveryIT extends AbstractSnapshotIntegTestCase
|
|
|
String indexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
|
|
|
createIndex(
|
|
|
indexName,
|
|
|
- Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0).build()
|
|
|
+ Settings.builder()
|
|
|
+ .put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
|
|
|
+ .put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
|
|
|
+ .put(MergePolicyConfig.INDEX_MERGE_ENABLED, false) // merging might change the primary segments after the snapshot
|
|
|
+ .build()
|
|
|
);
|
|
|
ensureGreen(indexName);
|
|
|
|