Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
None
-
None
-
Security Level: Public
-
None
-
Couchbase server: Version: 3.0.1 Community Edition (build-1444)
Couchbase Nodjs module: couchbase@2.0.4
Description
If We try to invoke an insert for a locked document we receive an error "The key does not exist on the server." with code 13. In this case we cannot distinguish between the cases:
- If the key really doesn't exist, we have to create.
- If the document is locked, we have to try later.
If we provide a cas value (not the one from getAndLock) then the error message indicates a wrong cas value (code 12), which is also unambiguous:
- If it is just a CAS error (not locked), we want to repeat replace immediately
- If it is locked, we have to wait a little, and then repeat
For easier reproduction I created a Gist example:
https://gist.github.com/baloghz/a569ae184ee17468b0f2
Regards
Zoltán
Attachments
Issue Links
- relates to
-
MB-12751 Replace on a locked doc gives Key not found error
- Closed