Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
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.