Description
When a non-existent collection is specified. get() (and other) operations do not immediately return with "collection not found". timeout is set to 3000 ms. Get completes in 5959 ms with error (slightly less than 2x timeout) . Subsequent get() calls with 5000ms timeout complete in around 9658 ms (output not shown, run kv-operations.js and hit localhost:3000/getwithoptions
Also - I suspect the "UnhandledPromiseRejectionWarning" needs to be addressed based on "promise rejections that are not handled will terminate the Node.js process"
% node kv2.js
get: 5959
===========
CollectionNotFoundError: collection not found
at _getWrappedErr (/Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/errors.js:835:14)
at Object.wrapLcbErr (/Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/errors.js:1008:20)
at /Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/collection.js:218:24 {
cause: LibcouchbaseError
{ code: 211 },
context: KeyValueErrorContext {
status_code: 4,
opaque: 0,
cas: CbCas
{ '0': <Buffer 00 00 00 00 00 00 00 00> },
key: 'airport_77',
bucket: 'travel-sample',
collection: '',
scope: '',
context: '',
ref: ''
}
}
=========== get failed with 211
===========
(node:4228) UnhandledPromiseRejectionWarning: Error: collection not found
at _getWrappedErr (/Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/errors.js:835:14)
at Object.wrapLcbErr (/Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/errors.js:1008:20)
at /Users/michaelreiche/git/docs-sdk-nodejs/modules/howtos/examples/node_modules/couchbase/lib/collection.js:218:24
(node:4228) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4228) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
^C
michaelreiche@hqml0612s-mbp examples %
Attachments
Issue Links
- depends on
-
CCBC-1158 SDK DOS's the server if you try to use a missing collection
- Resolved