Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-1226

acouchbase - Get server version after connected

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.2.7
    • None
    • None
    • 1

    Description

      Re: PYCBC-1192 - "In order to incorporate the management API into acouchbase, the Admin connection needs to be asynchronous. While the implementation is straight-forward, due to PYCBC-866 (dependent upon CCBC-1204) some changes needed to be made on when the server version is obtained. The change is needed because the current HTTP request is within a synchronous path. Once the Admin connection becomes asynchronous this will no longer be viable (note this only impacts the acouchbase and txcouchbase APIs). The update is to obtain the server version within the C-bindings right after bootstrapping is complete (that way we know we have a valid lcb instance)."

      This ticket will remove obtaining the server version via the C-bindings. Instead the server version will be obtained by chaining the connect future with a future that handles the HTTP request to get the server version. The end user will not see a difference (i.e. users will still just await the connection: await cluster.on_connect()). The benefit is that chaining the futures will help keep the connection operation separate from the HTTP operation of obtaining the server version. This is most highlight in the event of an error, we will know if there is either a connect error or an HTTP error when trying to get the server version.

      Note the 4.0 version of the Python SDK does not have this issue.

      Attachments

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

        Activity

          jared.casey Jared Casey added a comment -

          Updated couchbase and acouchbase API to get server version after bootstrap callback has completed.

          jared.casey Jared Casey added a comment - Updated couchbase and acouchbase API to get server version after bootstrap callback has completed.

          People

            jared.casey Jared Casey
            jared.casey Jared Casey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty