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

Missing callback for outstanding requests when disconnecting bucket

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 3.2.1
    • lcb, library
    • SDK34: CB++, OBO, Connect Prep

    Description

      Couchbase client is not calling bucket operation callback for outstanding couchbase request when bucket disconnect is called.

      Attachments

        Issue Links

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

          Activity

            Here is the implementation pattern found in our application code that causes this issue.  We have several applications that implement this pattern to force a reconnect to the Couchbase cluster when certain errors are received by the app-specified callback in response to a Couchbase node.js client library transaction error.  These are HTTP server applications that process many concurrent requests each of which may initiate one or more Couchbase transactions. 

            if (bucket) {
                bucket.disconnect();
            }
            bucket = cluster.openBucket(config.bucketName, config.bucketPassword,function(err) {…});

            My observation is that the app-specified callback does not get invoked for any pending couchbase transaction that is awaiting a response from the Couchbase node.js client library when bucket.disconnect() is called followed immediately by openBucket.  I tested with couchbase node.js client v2.3.0 and v2.4.0, both of which exhibit this issue.   I would expect the outstanding app-specified callbacks to be invoked with an error in this case.

            josborne Jason Osborne added a comment - Here is the implementation pattern found in our application code that causes this issue.  We have several applications that implement this pattern to force a reconnect to the Couchbase cluster when certain errors are received by the app-specified callback in response to a Couchbase node.js client library transaction error.  These are HTTP server applications that process many concurrent requests each of which may initiate one or more Couchbase transactions.  if (bucket) {     bucket.disconnect(); } bucket = cluster.openBucket(config.bucketName, config.bucketPassword,function(err) {…}); My observation is that the app-specified callback does not get invoked for any pending couchbase transaction that is awaiting a response from the Couchbase node.js client library when bucket.disconnect() is called followed immediately by openBucket.  I tested with couchbase node.js client v2.3.0 and v2.4.0, both of which exhibit this issue.   I would expect the outstanding app-specified callbacks to be invoked with an error in this case.

            I see that there has been recent activity on CCBC-861 to address the cause of this issue.  Glad to see this moving forward.  

            josborne Jason Osborne added a comment - I see that there has been recent activity on CCBC-861  to address the cause of this issue.  Glad to see this moving forward.  
            brett19 Brett Lawson added a comment -

            Moving to 3.0.1 as its dependent issue was not fixed in libcouchbase yet.

            brett19 Brett Lawson added a comment - Moving to 3.0.1 as its dependent issue was not fixed in libcouchbase yet.
            brett19 Brett Lawson added a comment -

            Moving back into 3.2.0 as I believe libcouchbase has a fix for this on the way.

            brett19 Brett Lawson added a comment - Moving back into 3.2.0 as I believe libcouchbase has a fix for this on the way.
            brett19 Brett Lawson added a comment -

            This should be fixed indirectly by the fix for JSCBC-910.

            brett19 Brett Lawson added a comment - This should be fixed indirectly by the fix for JSCBC-910 .

            People

              brett19 Brett Lawson
              purnomp@cisco.com Jeremy Wang
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty