Uploaded image for project: 'Couchbase node.js Client Library'
  1. Couchbase node.js Client Library
  2. JSCBC-1243

Unable to retrieve binary documents with TransactionAttemptContext

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.3.1
    • 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

      1. Create binary and JSON documents in `travel-sample._default.users` collection (or adjust the bucket/scope/collection in index.js) and run index.js
      2. Observe first two console.log() statements show documents retrieved, but we never make it to the third

      Attachments

        1. index.js
          2 kB
          Elliot Scribner
        2. Screenshot 2024-03-08 at 12.09.39 PM.png
          132 kB
          Elliot Scribner
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jared.casey Jared Casey
            elliot.scribner Elliot Scribner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty