1 2 "Start scroll in mixed cluster on upgraded node that we will continue after upgrade": 3 - do: 4 indices.create: 5 index: upgraded_scroll 6 wait_for_active_shards: all 7 body: 8 settings: 9 # we use 1 replica to make sure we don't have shards relocating. Relocating a shard with 10 # a scroll on it prevents shards from moving back into a where a scroll is running (it holds the shard lock) 11 # see https://github.com/elastic/elasticsearch/issues/31827 12 number_of_replicas: 1 13 index.routing.allocation.include.upgraded: true 14 15 - do: 16 index: 17 index: upgraded_scroll 18 type: test 19 id: 42 20 body: { foo: 1 } 21 22 - do: 23 index: 24 index: upgraded_scroll 25 type: test 26 id: 43 27 body: { foo: 2 } 28 29 - do: 30 indices.refresh: {} 31 32 - do: 33 search: 34 index: upgraded_scroll 35 size: 1 36 scroll: 5m 37 sort: foo 38 body: 39 query: 40 match_all: {} 41 - set: {_scroll_id: scroll_id} 42 - match: {hits.total: 2 } 43 - length: {hits.hits: 1 } 44 - match: {hits.hits.0._id: "42" } 45 46 - do: 47 index: 48 index: scroll_index 49 type: doc 50 id: 1 51 body: { value: $scroll_id }