Details
-
Bug
-
Resolution: User Error
-
Major
-
None
-
None
-
None
-
1
Description
Using NodeJS 3.0.4 SDK, while performing a CAS check (on subdoc API mutateIn with upsert), the CAS value retrieved from N1QL behaves differently from the CAS value retrieved from KV GET.
- CAS coming from N1QL : NOK producing :
Error : document exists
- CAS coming from KV GET : OK (subdoc mutation performs OK)
Note: upsert is performed in both cases (no insert).
In copy 2 samples snippets showing :
- the error with N1QL: subdoc_with_query_KO.js
- the workaround (by adding a KV GET): subdoc_with_query_OK.js
Note : Not possible to reproduce the problem with Java 3.0 SDK
For subdoc_with_query_KO.js file, error is :
ERR: { Error: document exists
|
at _getWrappedErr (/Users/fabriceleray/node-couchbase-project/node_modules/couchbase/lib/errors.js:864:14) |
at Object.wrapLcbErr (/Users/fabriceleray/node-couchbase-project/node_modules/couchbase/lib/errors.js:1009:20) |
at _conn.mutateIn (/Users/fabriceleray/node-couchbase-project/node_modules/couchbase/lib/collection.js:1121:24) |
cause: LibcouchbaseError { code: 305 }, |
context:
|
KeyValueErrorContext {
|
status_code: 2, |
opaque: 0, |
cas: CbCas<0>, |
key: 'airline_10', |
bucket: 'travel-sample', |
collection: '', |
scope: '', |
context: '', |
ref: '' } } |
(node:5104) [DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated |
Attachments
Issue Links
- relates to
-
DOC-7164 Node.js CAS
- Resolved