Hi, we wonder about mutateIn increment operation.
Subdocument operations in the document are said to be atomic. Sub-Document Operations with the Java SDK | Couchbase Docs
Sub-Document operations are also atomic, in that if one Sub-Document mutation fails then all will, allowing safe modifications to documents with built-in concurrency control.
The Counters and Numeric Fields section is the same as the FullDocument operation is the same as logic. Sub-Document Operations with the Java SDK | Couchbase Docs
Counter operations allow the manipulation of a numeric value inside a document. These operations are logically similar to the increment and decrement full-document operations:
As an example,
we want to increase the count field of the two thread foo document or more thread…
final List<MutateInSpec> specs = Collections.singletonList(MutateInSpec.increment("count", 1)); genericRepository.mutateIn(collection, specs, documentId);
What do we see as value? 1 or 2
I know that if I do this with atomic counter, it will be 2. Key Value Operations | Couchbase Docs