mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-21 12:27:37 +00:00
Add a dummy_index to upgrade tests to ensure we recover fine with replicas (#24937)
We default to 0 replicas in the rolling restart scenario already to ensure we test against worst case. Yet, this adds a dummy index to ensure we also recover and index with replicas just fine.
This commit is contained in:
parent
bc4df47a76
commit
4d423bf2ba
@ -11,6 +11,12 @@
|
|||||||
|
|
||||||
- match: { hits.total: 5 } # no new indexed data, so expect the original 5 documents from the old cluster
|
- match: { hits.total: 5 } # no new indexed data, so expect the original 5 documents from the old cluster
|
||||||
|
|
||||||
|
- do:
|
||||||
|
search:
|
||||||
|
index: index_with_replicas
|
||||||
|
|
||||||
|
- match: { hits.total: 5 } # just check we recovered fine
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
bulk:
|
bulk:
|
||||||
refresh: true
|
refresh: true
|
||||||
|
@ -8,24 +8,43 @@
|
|||||||
index:
|
index:
|
||||||
number_of_replicas: 0
|
number_of_replicas: 0
|
||||||
|
|
||||||
|
- do:
|
||||||
|
indices.create:
|
||||||
|
index: index_with_replicas # dummy index to ensure we can recover indices with replicas just fine
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
bulk:
|
bulk:
|
||||||
refresh: true
|
refresh: true
|
||||||
body:
|
body:
|
||||||
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
|
- '{"index": {"_index": "test_index", "_type": "doc"}}'
|
||||||
- '{"f1": "v1_old", "f2": 0}'
|
- '{"f1": "v1_old", "f2": 0}'
|
||||||
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
|
- '{"index": {"_index": "test_index", "_type": "doc"}}'
|
||||||
- '{"f1": "v2_old", "f2": 1}'
|
- '{"f1": "v2_old", "f2": 1}'
|
||||||
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
|
- '{"index": {"_index": "test_index", "_type": "doc"}}'
|
||||||
- '{"f1": "v3_old", "f2": 2}'
|
- '{"f1": "v3_old", "f2": 2}'
|
||||||
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
|
- '{"index": {"_index": "test_index", "_type": "doc"}}'
|
||||||
- '{"f1": "v4_old", "f2": 3}'
|
- '{"f1": "v4_old", "f2": 3}'
|
||||||
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
|
- '{"index": {"_index": "test_index", "_type": "doc"}}'
|
||||||
- '{"f1": "v5_old", "f2": 4}'
|
- '{"f1": "v5_old", "f2": 4}'
|
||||||
|
|
||||||
|
- do:
|
||||||
|
bulk:
|
||||||
|
refresh: true
|
||||||
|
body:
|
||||||
|
- '{"index": {"_index": "index_with_replicas", "_type": "doc"}}'
|
||||||
|
- '{"f1": "d_old"}'
|
||||||
|
- '{"index": {"_index": "index_with_replicas", "_type": "doc"}}'
|
||||||
|
- '{"f1": "d_old"}'
|
||||||
|
- '{"index": {"_index": "index_with_replicas", "_type": "doc"}}'
|
||||||
|
- '{"f1": "d_old"}'
|
||||||
|
- '{"index": {"_index": "index_with_replicas", "_type": "doc"}}'
|
||||||
|
- '{"f1": "d_old"}'
|
||||||
|
- '{"index": {"_index": "index_with_replicas", "_type": "doc"}}'
|
||||||
|
- '{"f1": "d_old"}'
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
indices.flush:
|
indices.flush:
|
||||||
index: test_index
|
index: test_index,index_with_replicas
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
search:
|
search:
|
||||||
@ -33,6 +52,12 @@
|
|||||||
|
|
||||||
- match: { hits.total: 5 }
|
- match: { hits.total: 5 }
|
||||||
|
|
||||||
|
- do:
|
||||||
|
search:
|
||||||
|
index: index_with_replicas
|
||||||
|
|
||||||
|
- match: { hits.total: 5 }
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
snapshot.create_repository:
|
snapshot.create_repository:
|
||||||
repository: my_repo
|
repository: my_repo
|
||||||
|
@ -11,6 +11,12 @@
|
|||||||
|
|
||||||
- match: { hits.total: 10 } # no new indexed data, so expect the original 10 documents from the old and mixed clusters
|
- match: { hits.total: 10 } # no new indexed data, so expect the original 10 documents from the old and mixed clusters
|
||||||
|
|
||||||
|
- do:
|
||||||
|
search:
|
||||||
|
index: index_with_replicas
|
||||||
|
|
||||||
|
- match: { hits.total: 5 } # just check we recovered fine
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
bulk:
|
bulk:
|
||||||
refresh: true
|
refresh: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user