Details
-
Bug
-
Resolution: Fixed
-
Major
-
4.2.11
-
None
-
None
-
MacOS 13.2.1, Couchbase Server Enterprise Edition 7.2.4 build 7070 running in Docker
-
0
Description
Description
Fetching binary/plaintext documents via a TransactionAttemptContext seems to fail, and exits without any information. `ctx.get()` for a normal JSON document works, as does fetching the binary doc with `collection.get()`.
This was discovered when implementing transactions on Ottoman, as we use binary docs for our refdoc implementation. The offending lines are here: https://github.com/couchbaselabs/node-ottoman/pull/758/files#diff-dbfff5681984fd751309a6ef8fbc810eeba678c07dc87f873ff9fec7f18158caR38-R46
Actual Behavior
Using `ctx.get()` with a binary document's ID doesn't return the document, and exits without additional info.
Expected Behavior
Using `ctx.get()` with a binary document's ID should return the document the same way it does for JSON documents.
Evidence
The attached `index.js` file attempts to get three documents (a JSON doc via ctx, a binary doc via collection, and a binary doc via ctx), the first two of which work fine, but it never gets past the last one.
Steps to Reproduce
- Create binary and JSON documents in `travel-sample._default.users` collection (or adjust the bucket/scope/collection in index.js) and run index.js
- Observe first two console.log() statements show documents retrieved, but we never make it to the third