From 1e676ab9c5c9337786fd663a2a3fdf755a637c0a Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Sat, 31 Aug 2019 14:11:58 +0200 Subject: [PATCH] Stabilize SLM REST Tests (#46195) Unfortunately, #42791 destabilized SLM tests because those tests use rate limiting the snapshot write rate to a very low value globally. Now that the various files in a snapshot get uploaded in parallel this can lead to a few threads in parallel way overshooting the low value throughput value used by the rate limiter and then making it wait for minutes which times out the tests that then try to abort the snapshot (see #21759 for details, aborting a snapshot only happens when writing bytes to the repository). For now the old behavior of the test from before my changes can be restored by moving to a single threaded snapshot pool but we should find a better way of testing the SLM behaviour here in a follow-up. --- x-pack/plugin/ilm/qa/multi-node/build.gradle | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/ilm/qa/multi-node/build.gradle b/x-pack/plugin/ilm/qa/multi-node/build.gradle index 77464b031aa15..1746cc8f840ce 100644 --- a/x-pack/plugin/ilm/qa/multi-node/build.gradle +++ b/x-pack/plugin/ilm/qa/multi-node/build.gradle @@ -1,5 +1,3 @@ -import org.elasticsearch.gradle.test.RestIntegTestTask - apply plugin: 'elasticsearch.testclusters' apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' @@ -27,4 +25,8 @@ testClusters.integTest { setting 'xpack.ml.enabled', 'false' setting 'xpack.license.self_generated.type', 'trial' setting 'indices.lifecycle.poll_interval', '1000ms' + // TODO: Find a way to run these tests with more than one snapshot pool thread. Currently we need to limit to one thread so that the + // rate limiting settings in SnapshotLifecycleIT doesn't result in blocked snapshot threads because multiple threads overshoot + // the limit simultaneously and the rate limiter then moves to wait minutes to make up for this. + setting 'thread_pool.snapshot.max', '1' }