mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 21:48:39 +00:00
Separate version check logic for reads and writes for all version types, which allows different behavior in these cases. Change `VersionType.EXTERNAL` & `VersionType.EXTERNAL_GTE` to behave the same as `VersionType.INTERNAL` for read operations. The previous behavior was fit for writes but is useless in reads. This commit also makes the usage of `EXTERNAL` & `EXTERNAL_GTE` in the update api raise a validation error as it make cause data to be lost. Closes #5663 , Closes #5661, Closes #5929
25 lines
482 B
YAML
25 lines
482 B
YAML
---
|
|
"Internal version":
|
|
|
|
- do:
|
|
catch: conflict
|
|
update:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
version: 1
|
|
body:
|
|
doc: { foo: baz }
|
|
upsert: { foo: bar }
|
|
|
|
- do:
|
|
catch: conflict
|
|
update:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
version: 1
|
|
body:
|
|
doc: { foo: baz }
|
|
upsert: { foo: bar }
|