From c6666fc6cbb7afd3b4114453c9c9327a3361f130 Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Tue, 10 Jul 2018 10:52:03 +0200 Subject: [PATCH] rolling upgrade should use a replica to prevent relocations while running a scroll A scroll holds a reference to the shard store. If the cluster is moving shards around that reference can prevent a shard from relocating back to node it used to be on, causing test failures. Closes #31827 --- .../resources/rest-api-spec/test/mixed_cluster/10_basic.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yml b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yml index 3dd1f708959ed..66c92797eef2a 100644 --- a/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yml +++ b/x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/10_basic.yml @@ -6,7 +6,10 @@ wait_for_active_shards: all body: settings: - number_of_replicas: 0 +# we use 1 replica to make sure we don't have shards relocating. Relocating a shard with +# a scroll on it prevents shards from moving back into a where a scroll is running (it holds the shard lock) +# see https://github.com/elastic/elasticsearch/issues/31827 + number_of_replicas: 1 index.routing.allocation.include.upgraded: true - do: