Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not send version conflicts to failure store (elastic#112537)
When indexing to a data stream with a failure store it's possible to get a version conflict. The reproduction path is the following: ``` PUT /_bulk {"create":{"_index": "my-ds-with-fs", "_id": "1"}} {"@timestamp": "2022-01-01", "baz": "quick", "a": "brown", "b": "fox"} {"create":{"_index": "my-ds-with-fs", "_id": "1"}} {"@timestamp": "2022-01-01", "baz": "lazy", "a": "dog"} ``` We would like the second document to not be sent to the failure store and return an error to the user: ``` { "errors" : true, "took" : 409, "items" : [ { "create" : { "_index" : ".ds-my-ds-with-fs-xxxxx-xxxx", "_id" : "1", "_version" : 1, "result" : "created", "_shards" : { "total" : 2, "successful" : 1, "failed" : 0 }, "_seq_no" : 0, "_primary_term" : 1, "status" : 201 } }, { "create" : { "_index" : ".ds-my-ds-with-fs-xxxxx-xxxx", "_id" : "1", "status" : 409, "error" : { "type" : "version_conflict_engine_exception", "reason" : "[1]: version conflict, document already exists (current version [1])", "index_uuid" : ".....", "shard" : "0", "index" : ".ds-my-ds-with-fs-xxxxx-xxxx" } } } ] } ``` The version conflict doc is counted as a rejected doc in APM telemetry.
- Loading branch information