|
@@ -1,12 +1,12 @@
|
|
|
---
|
|
|
setup:
|
|
|
- skip:
|
|
|
- version: "- 8.12.99"
|
|
|
- reason: _tsid hashing introduced in 8.13
|
|
|
+ version: "- 8.13.99"
|
|
|
+ reason: _tsid hashing introduced in 8.13 and tsid routing changed in 8.14
|
|
|
|
|
|
- do:
|
|
|
indices.create:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
settings:
|
|
|
index:
|
|
@@ -44,7 +44,7 @@ setup:
|
|
|
- do:
|
|
|
bulk:
|
|
|
refresh: true
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
- '{"index": {}}'
|
|
|
- '{"@timestamp": "2021-04-28T18:50:04.467Z", "metricset": "pod", "k8s": {"pod": {"name": "cat", "uid":"947e4ced-1786-4e53-9e0c-5c447e959507", "ip": "10.10.55.1", "network": {"tx": 2001818691, "rx": 802133794}}}}'
|
|
@@ -65,14 +65,10 @@ setup:
|
|
|
|
|
|
---
|
|
|
generates a consistent id:
|
|
|
- - skip:
|
|
|
- version: " - 8.1.99"
|
|
|
- reason: ID generation added in 8.2
|
|
|
-
|
|
|
- do:
|
|
|
bulk:
|
|
|
refresh: true
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
- '{"index": {}}'
|
|
|
- '{"@timestamp": "2021-04-28T18:52:04.467Z", "metricset": "pod", "k8s": {"pod": {"name": "cat", "uid":"947e4ced-1786-4e53-9e0c-5c447e959507", "ip": "10.10.55.1", "network": {"tx": 2001818691, "rx": 802133794}}}}'
|
|
@@ -81,15 +77,35 @@ generates a consistent id:
|
|
|
- do:
|
|
|
bulk:
|
|
|
refresh: true
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
- '{"index": {}}'
|
|
|
- '{"@timestamp": "2021-04-28T18:52:04.467Z", "metricset": "pod", "k8s": {"pod": {"name": "cat", "uid":"947e4ced-1786-4e53-9e0c-5c447e959507", "ip": "10.10.55.1", "network": {"tx": 2001818691, "rx": 802133794}}}}'
|
|
|
- match: {items.0.index._id: cZZNs7B9sSWsyrL5AAABeRnS7fM}
|
|
|
|
|
|
+ - do:
|
|
|
+ get:
|
|
|
+ index: id_generation_test
|
|
|
+ id: cn4excfoxSs_KdA5AAABeRnRFAY
|
|
|
+ - match: {_index: id_generation_test}
|
|
|
+ - match: {_id: cn4excfoxSs_KdA5AAABeRnRFAY}
|
|
|
+ - match:
|
|
|
+ _source:
|
|
|
+ "@timestamp": "2021-04-28T18:50:03.142Z"
|
|
|
+ metricset: pod
|
|
|
+ k8s:
|
|
|
+ pod:
|
|
|
+ name: dog
|
|
|
+ uid: df3145b3-0563-4d3b-a0f7-897eb2876ea9
|
|
|
+ ip: 10.10.55.3
|
|
|
+ network:
|
|
|
+ tx: 1434521831
|
|
|
+ rx: 530575198
|
|
|
+
|
|
|
+
|
|
|
- do:
|
|
|
search:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
query:
|
|
|
match_all: {}
|
|
@@ -135,13 +151,9 @@ generates a consistent id:
|
|
|
|
|
|
---
|
|
|
index a new document on top of an old one:
|
|
|
- - skip:
|
|
|
- version: " - 8.12.99"
|
|
|
- reason: _tsid hashing introduced in 8.13
|
|
|
-
|
|
|
- do:
|
|
|
search:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
size: 0
|
|
|
aggs:
|
|
@@ -157,7 +169,7 @@ index a new document on top of an old one:
|
|
|
- do:
|
|
|
index:
|
|
|
refresh: true
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
op_type: index
|
|
|
body:
|
|
|
"@timestamp": "2021-04-28T18:51:03.142Z"
|
|
@@ -174,7 +186,7 @@ index a new document on top of an old one:
|
|
|
|
|
|
- do:
|
|
|
search:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
size: 0
|
|
|
aggs:
|
|
@@ -189,13 +201,9 @@ index a new document on top of an old one:
|
|
|
|
|
|
---
|
|
|
index a new document on top of an old one over bulk:
|
|
|
- - skip:
|
|
|
- version: " - 8.1.99"
|
|
|
- reason: indexing on top of another document support added in 8.2
|
|
|
-
|
|
|
- do:
|
|
|
search:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
size: 0
|
|
|
aggs:
|
|
@@ -211,7 +219,7 @@ index a new document on top of an old one over bulk:
|
|
|
- do:
|
|
|
bulk:
|
|
|
refresh: true
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
- '{"index": {}}'
|
|
|
- '{"@timestamp": "2021-04-28T18:51:03.142Z", "metricset": "pod", "k8s": {"pod": {"name": "dog", "uid":"df3145b3-0563-4d3b-a0f7-897eb2876ea9", "ip": "10.10.55.3", "network": {"tx": 111434595272, "rx": 430605511}}}}'
|
|
@@ -219,7 +227,7 @@ index a new document on top of an old one over bulk:
|
|
|
|
|
|
- do:
|
|
|
search:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
size: 0
|
|
|
aggs:
|
|
@@ -234,15 +242,11 @@ index a new document on top of an old one over bulk:
|
|
|
|
|
|
---
|
|
|
create operation on top of old document fails:
|
|
|
- - skip:
|
|
|
- version: " - 8.1.99"
|
|
|
- reason: id generation changed in 8.2
|
|
|
-
|
|
|
- do:
|
|
|
catch: "/\\[cn4excfoxSs_KdA5AAABeRnR_mY\\]\\[.*@2021-04-28T18:51:03.142Z\\]: version conflict, document already exists \\(current version \\[1\\]\\)/"
|
|
|
index:
|
|
|
refresh: true
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
"@timestamp": "2021-04-28T18:51:03.142Z"
|
|
|
metricset: pod
|
|
@@ -257,14 +261,10 @@ create operation on top of old document fails:
|
|
|
|
|
|
---
|
|
|
create operation on top of old document fails over bulk:
|
|
|
- - skip:
|
|
|
- version: " - 8.12.99"
|
|
|
- reason: _tsid hashing introduced in 8.13
|
|
|
-
|
|
|
- do:
|
|
|
bulk:
|
|
|
refresh: true
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
- '{"create": {}}'
|
|
|
- '{"@timestamp": "2021-04-28T18:51:03.142Z", "metricset": "pod", "k8s": {"pod": {"name": "dog", "uid":"df3145b3-0563-4d3b-a0f7-897eb2876ea9", "ip": "10.10.55.3", "network": {"tx": 111434595272, "rx": 430605511}}}}'
|
|
@@ -272,13 +272,9 @@ create operation on top of old document fails over bulk:
|
|
|
|
|
|
---
|
|
|
ids query:
|
|
|
- - skip:
|
|
|
- version: " - 8.12.99"
|
|
|
- reason: _tsid hashing introduced in 8.13
|
|
|
-
|
|
|
- do:
|
|
|
search:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
fields:
|
|
|
- field: k8s.pod.network.tx
|
|
@@ -294,15 +290,11 @@ ids query:
|
|
|
|
|
|
---
|
|
|
get:
|
|
|
- - skip:
|
|
|
- version: " - 8.12.99"
|
|
|
- reason: _tsid hashing introduced in 8.13
|
|
|
-
|
|
|
- do:
|
|
|
get:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
id: cZZNs7B9sSWsyrL5AAABeRnSA5M
|
|
|
- - match: {_index: test}
|
|
|
+ - match: {_index: id_generation_test}
|
|
|
- match: {_id: cZZNs7B9sSWsyrL5AAABeRnSA5M}
|
|
|
- match:
|
|
|
_source:
|
|
@@ -319,89 +311,65 @@ get:
|
|
|
|
|
|
---
|
|
|
get not found:
|
|
|
- - skip:
|
|
|
- version: " - 8.1.99"
|
|
|
- reason: ids generation changed in 8.2
|
|
|
-
|
|
|
- do:
|
|
|
catch: missing
|
|
|
get:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
id: not found
|
|
|
|
|
|
---
|
|
|
get with routing:
|
|
|
- - skip:
|
|
|
- version: " - 8.1.99"
|
|
|
- reason: ids generation changed in 8.2
|
|
|
-
|
|
|
- do:
|
|
|
catch: bad_request
|
|
|
get:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
id: cZZNs-xII2fZweptAAABeRnSA5M
|
|
|
routing: routing
|
|
|
|
|
|
---
|
|
|
delete:
|
|
|
- - skip:
|
|
|
- version: " - 8.12.99"
|
|
|
- reason: _tsid hashing introduced in 8.13
|
|
|
-
|
|
|
- do:
|
|
|
delete:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
id: cn4excfoxSs_KdA5AAABeRnR_mY
|
|
|
- match: {result: deleted}
|
|
|
|
|
|
---
|
|
|
delete not found:
|
|
|
- - skip:
|
|
|
- version: " - 8.1.99"
|
|
|
- reason: ids generation changed in 8.2
|
|
|
-
|
|
|
- do:
|
|
|
catch: missing
|
|
|
delete:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
id: not found
|
|
|
|
|
|
---
|
|
|
delete with routing:
|
|
|
- - skip:
|
|
|
- version: " - 8.1.99"
|
|
|
- reason: ids generation changed in 8.2
|
|
|
-
|
|
|
- do:
|
|
|
catch: bad_request
|
|
|
delete:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
id: not found
|
|
|
routing: routing
|
|
|
|
|
|
---
|
|
|
delete over _bulk:
|
|
|
- - skip:
|
|
|
- version: " - 8.1.99"
|
|
|
- reason: ids generation changed in 8.2
|
|
|
-
|
|
|
# mget call added to investigate test failure: https://github.com/elastic/elasticsearch/issues/93852
|
|
|
# (should be removed when test issue is resolved)
|
|
|
- do:
|
|
|
mget:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
ids: [ cn4excfoxSs_KdA5AAABeRnR_mY, cn4excfoxSs_KdA5AAABeRnR11Y ]
|
|
|
- - match: { docs.0._index: "test" }
|
|
|
+ - match: { docs.0._index: "id_generation_test" }
|
|
|
- match: { docs.0._id: "cn4excfoxSs_KdA5AAABeRnR_mY" }
|
|
|
- match: { docs.0.found: true }
|
|
|
- - match: { docs.1._index: "test" }
|
|
|
+ - match: { docs.1._index: "id_generation_test" }
|
|
|
- match: { docs.1._id: "cn4excfoxSs_KdA5AAABeRnR11Y" }
|
|
|
- match: { docs.1.found: true }
|
|
|
|
|
|
- do:
|
|
|
bulk:
|
|
|
- index: test
|
|
|
+ index: id_generation_test
|
|
|
body:
|
|
|
- '{"delete": {"_id": "cn4excfoxSs_KdA5AAABeRnR_mY"}}'
|
|
|
- '{"delete": {"_id": "cn4excfoxSs_KdA5AAABeRnR11Y"}}'
|
|
@@ -409,17 +377,13 @@ delete over _bulk:
|
|
|
- match: {items.0.delete.result: deleted}
|
|
|
- match: {items.1.delete.result: deleted}
|
|
|
- match: {items.2.delete.status: 404}
|
|
|
- - match: {items.2.delete.error.reason: "invalid id [not found ++ not found] for index [test] in time series mode"}
|
|
|
+ - match: {items.2.delete.error.reason: "invalid id [not found ++ not found] for index [id_generation_test] in time series mode"}
|
|
|
|
|
|
---
|
|
|
routing_path matches deep object:
|
|
|
- - skip:
|
|
|
- version: " - 8.12.99"
|
|
|
- reason: _tsid hashing introduced in 8.13
|
|
|
-
|
|
|
- do:
|
|
|
indices.create:
|
|
|
- index: test2
|
|
|
+ index: routing_path_test
|
|
|
body:
|
|
|
settings:
|
|
|
index:
|
|
@@ -449,7 +413,7 @@ routing_path matches deep object:
|
|
|
- do:
|
|
|
bulk:
|
|
|
refresh: true
|
|
|
- index: test2
|
|
|
+ index: routing_path_test
|
|
|
body:
|
|
|
- '{"index": {}}'
|
|
|
- '{"@timestamp": "2021-04-28T18:50:04.467Z", "dim": {"foo": {"bar": {"baz": {"uid": "uid1"}}}}}'
|
|
@@ -458,13 +422,9 @@ routing_path matches deep object:
|
|
|
|
|
|
---
|
|
|
routing_path matches object:
|
|
|
- - skip:
|
|
|
- version: " - 8.12.99"
|
|
|
- reason: _tsid hashing introduced in 8.13
|
|
|
-
|
|
|
- do:
|
|
|
indices.create:
|
|
|
- index: test2
|
|
|
+ index: routing_path_test_2
|
|
|
body:
|
|
|
settings:
|
|
|
index:
|
|
@@ -490,7 +450,7 @@ routing_path matches object:
|
|
|
- do:
|
|
|
bulk:
|
|
|
refresh: true
|
|
|
- index: test2
|
|
|
+ index: routing_path_test_2
|
|
|
body:
|
|
|
- '{"index": {}}'
|
|
|
- '{"@timestamp": "2021-04-28T18:50:04.467Z", "dim": {"foo": {"uid": "uid1"}}}'
|