let mutateIn = bucket.getMutateIn(path); mutateIn.counter('subpathX.counter', 1) mutateIn.replace('subpathX.lastUpdated', Date.now()) mutateIn.execute();
the docs say that subdoc mutations are atomic, but I’m not sure what that means exactly?
does it mean that the operation is an atomic unit that will bring the document from some state
x to state
y where a race condition is impossible and there will NEVER be CAS failure (because the database will handle the queuing).
Or does it simply mean that it’s an atomic transaction that will either succeed entirely or fail entirely, but can absolutely fail because of a cas problem, where some other process mutated the doc before this subdocument mutation completed.