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

Intermittent failure of couchbase node API for fnFtsQuery

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.2.3
    • 2.1.7
    • library
    • None
    • Couchbase "version": "4.0.0-4051-community"
      OSX 10.11.6
      docker version 1.12.0-a build 11213
      Webserver is node 6.4.0 node_modules couchbase npm installation is 2.2.2

    Description

      [Full technical run-down can be found in this forum post](https://forums.couchbase.com/t/intermittent-failure-of-couchbase-node-api-for-fnftsquery/9716).

      My colleague posted the link above, will continue to update there if he finds anything else.

      Summary:

      In couchbase_impl.cc, in the function n1qlrow_callback, there is this code:

      dataRes = jsonParseLcl->Call(Nan::GetCurrentContext()->Global(), 1, &metaStr);
      

      This code fails in an unrecoverable way (at the nodeJS layer) when it receives garbled or bad JSON responses from the couchbase server. The way this manifests in nodeJS is as an error without a stack trace, which can't be caught and terminates the program.

      Root cause appears to be garbled "metrics" JSON data coming back from the server, causing an attempt to parse resulting JSON to fail, but unable to tell the source of the bad JSON, whether in the C library or coming from the server.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              brett19 Brett Lawson
              moxious Moxious X
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty