Describe the issue:
Are Upsert operations atomic in OpenSearch?
According to this: Elasticsearch Upsert: Performing Upsert Operations, with Examples
under “Benefits of Using Upsert” → #2
" Consistency: By using upserts, you can ensure that your data remains consistent, even if multiple clients are attempting to update or insert the same document simultaneously. Upsert operations are atomic, which means that they are either fully completed or not executed at all, preventing partial updates or inserts"
Configuration:
Using .Net app with OpenSearch.Client
I know OpenSearch inherited from Elasticsearch.
How can I make sure this is true? because I didn’t find in OpenSearch’s documentation anything related to that.
Also, every version of OpenSearch contains this atomicity in “upsert” operation? or only in certain versions? Because OpenSearch is a fork of ElasticSearch from a specific version.
I tried to look find that in the code but couldn’t.
I don’t see how this answers my question.
Anyway, I talked to AWS support that contacted OpenSearch development team, and this is their answer was that “upsert” update should be atomic.
Also if 2 different clients try to update the same document at the same time, and only one of t he two requests would run into a version conflict exception. The exception that would be thrown is “version_conflict_engine_exception”.