Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@

- 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:
bulk:
refresh: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,56 @@
index:
number_of_replicas: 0

- do:
indices.create:
index: index_with_replicas # dummy index to ensure we can recover indices with replicas just fine

- do:
bulk:
refresh: true
body:
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"index": {"_index": "test_index", "_type": "doc"}}'
- '{"f1": "v1_old", "f2": 0}'
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"index": {"_index": "test_index", "_type": "doc"}}'
- '{"f1": "v2_old", "f2": 1}'
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"index": {"_index": "test_index", "_type": "doc"}}'
- '{"f1": "v3_old", "f2": 2}'
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"index": {"_index": "test_index", "_type": "doc"}}'
- '{"f1": "v4_old", "f2": 3}'
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"index": {"_index": "test_index", "_type": "doc"}}'
- '{"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:
indices.flush:
index: test_index
index: test_index,index_with_replicas

- do:
search:
index: test_index

- match: { hits.total: 5 }

- do:
search:
index: index_with_replicas

- match: { hits.total: 5 }

- do:
snapshot.create_repository:
repository: my_repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@

- 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:
bulk:
refresh: true
Expand Down