We are using Couchbase as a work queue and have multiple NodeJs clients update a bucket concurrently. The N1QL query run by clients tries to lock (sets a lock field) 200 documents at a time using UPDATE query with LIMIT. Frequently, DML Error due to concurrent update errors occurs. We know Couchbase reads 200 documents and then makes changes. We need to know if a client WHILE updating 200 documents say after making changes to 100 documents enoucnters DML error, then what happpens.
- Does Couchbase reverts the changes made to the updated 100 documents and returns error.
- Couchbase leaves the updated 100 documents with the changes and returns error.
Our observation shows Couchbase does the option 2). Can someone please confim.