A newer version of this documentation is available.

View Latest

Couchbase Go SDK Release Notes

    Release notes, installation instructions, and download archive for the Couchbase Go Client.

    These pages cover the 2.0 versions of the Couchbase Go SDK (3.0 SDK API). For release notes, download links, and installation methods for 1.6 and earlier releases of the Couchbase Go Client, please see the 1.x Go Release Notes & Download Archive.

    SDK Installation

    $ go get github.com/couchbase/gocb/v2@v2.1.8
    In line with the Golang project, we support both the current, and the previous, versions of Go. Older versions may work, but are not supported.

    API Documentation

    The most current and up to date API Documentation is always available through the godoc website.

    Version 2.1.8 (17 November 2020)

    Version 2.1.8 is a maintenance release for the Go SDK 2.1.0.

    New Features and Behavioral Changes

    • GOCBC-937: Added uncommitted support for GeoPolygon search queries.

    • GOCBC-1005: Added document id to key value errors.

    • GOCBC-1006: Changed the log level for retry strategy retries from info to debug.

    Fixed Issues

    • GOCBC-1007: Fixed issue some operations were being incorrectly sent to the retry orchestrator on errors.

    Version 2.1.7 (20 October 2020)

    Version 2.1.7 is a maintenance release for the Go SDK 2.1.0.

    New Features and Behavioral Changes

    • GOCBC-938: Added uncommitted support for FlexIndex to QueryOptions.

    • GOCBC-942: Added uncommitted support for Scope level queries.

    • GOCBC-944: Added uncommitted support for Scope level analytics queries.

    • GOCBC-944: Added uncommitted support for User collections level RBAC.

    • GOCBC-994: Fixed issue where nil values used in subdoc MutateIn operations would be rejected by the server. These values are now coerced into JSON null values before sending.

    • GOCBC-1001: Added missing Terms, DateRanges, and NumericRanges fields to SearchFacetResult.

    Fixed Issues

    • GOCBC-977: Fixed issue where analytics GetPendingMutations was looking for the incorrect data structure in the HTTP response body.

    • GOCBC-990: Fixed issue where enhanced durability timeout adaptive algorithm was incorrect.

    • GOCBC-991: Fixed issue where authentication mechanisms were not correctly iterated on bootstrap.

    • GOCBC-996: Fixed issue where the Map datastructure was using invalid paths for At and Exists.

    Version 2.1.6 (15 September 2020)

    Version 2.1.6 is a maintenance release for the Go SDK 2.1.0.

    New Features and Behavioral Changes

    • GOCBC-979: Add ExpiryTime to GetResult, providing the point in time at which a document will expire.

    Fixed Issues

    • GOCBC-969: Fixed issue where the SDK would attempt to parse query metrics even if they weren’t present.

    • GOCBC-976: Fixed issue where custom transcoders were not supported for performing a get request with expiry.

    • GOCBC-978: Fixed issue where it was possible for more than one request to trigger switching from unknown to pending state for a given collection.

    • GOCBC-981: Fixed issue where setting the network connection string property to default would be discarded.

    Version 2.1.5 (18 August 2020)

    Version 2.1.5 is a maintenance release for the Go SDK 2.1.0.

    New Features and Behavioral Changes

    • GOCBC-926: Added a new Cluster level option to set which authentication mechanisms to use.

    • GOCBC-962: Exposed the ThresholdLogTracer and corresponding options so that threshold logging can be configured. The threshold logger can then be set on the Cluster level options as Tracer. Note: The threshold logger is the default tracer used by the SDK.

    Fixed Issues

    • GOCBC-718: Fixed issue where errors would be silently swallwed when performing JSON unmarshalling of search and view queries. Unmarshalling errors will now be surfaced by the result.Err() function after iterating results.

    • GOCBC-950: Fixed issue where the SDK was not performing HELLO with the JSON feature enabled, leading to some KV error message context being lost.

    • GOCBC-968: Fixed issue where n1ql indexes were being created using prepared statements.

    Version 2.1.4 (21 July 2020)

    Version 2.1.4 is a maintenance release for the Go SDK 2.1.0.

    New Features and Behavioral Changes

    • GOCBC-889: Added support for remaining service types to WaitUntilReadyOptions.

    • GOCBC-932: Added support for ephemeral bucket eviction types in the BucketManager.

    • GOCBC-951: Adjusted the default max idle http connection timeout to be 4.5s from unlimited.

    Fixed Issues

    • GOCBC-925: Fixed issue where errors could not be accessed for queries responding with a HTTP 200 status code but containing errors. Any errors that are included in the query response when the status code is 200 will now be surfaced through the result Err call.

    • GOCBC-928: Fixed issue where enhanced durability could be incorrectly flagged as unsupported.

    • GOCBC-931: Fixed issue where enhanced durability timeouts were being sent as seconds rather than milliseconds.

    • GOCBC-945: Fixed issue where ephemeral buckets could not be created using the BucketManager.

    • GOCBC-946: Fixed issue where MaxTTL was being sent as nanoseconds rather than seconds when creating buckets using the BucketManager.

    • GOCBC-955: Fixed issue where xattrs were being reordered when being moved to the front of the list in subdoc operations.

    Version 2.1.3 (1 July 2020)

    Version 2.1.3 is an off-cadence release for the Go SDK 2.1.0.

    Fixed Issues

    • GOCBC-941: Fixed issue where WaitUntilReady at the Cluster level would always timeout.

    Version 2.1.2 (16 June 2020)

    Version 2.1.2 is a maintenance release for the Go SDK 2.1.0.

    New Features and Behavioral Changes

    • GOCBC-907: Enhance search query errors to include the index name and error text from the server.

    • GOCBC-913: Ensure that only available services are used for Ping if no services specified.

    • GOCBC-923: Updated const declarations to add types to improve API reference.

    Fixed Issues

    • GOCBC-879, GOCBC-890: Fixed issue causing Cluster level operations to return errors when performed before underlying cluster or bucket connections are ready. These operations (query, search, analytics, views, management APIs) will now behave like key value operations - waiting for connections to be ready before they are sent. The WaitUntilReady call can still be used for verifying that connections are ready.

    • GOCBC-891: Fixed issue where the Name property of a Role was being sent as the incorrect json field name.

    • GOCBC-897: Fixed issue where operations with incredible short timeouts (timing out before operation sent) could cause a data race.

    • GOCBC-900: Fixed issue where IgnoreIfExists option was being ignored for query index management.

    • GOCBC-906: Fixed issue where enhanced durability could be incorrectly set as unsupported on early operations.

    • GOCBC-914: Fixed issue where operations using named collections could be sent with an incorrect collection ID in queued before the collection is known.

    Known issues

    • GOCBC-941: Performing Cluster level WaitUntilReady never completes within the timeout. This issue was introduced whilst fixing the behaviour for operations at the Cluster level when the WaitUntilReady call is not used. The workaround for this is to not use the Cluster level WaitUntilReady call, Cluster level operations will now be queued until the SDK has connected and setup anyway.

    Version 2.1.1 (19 May 2020)

    Version 2.1.1 is a maintenance release for the Go SDK 2.1.0.

    New Features and Behavioral Changes

    • GOCBC-778: Updated legacy durability polling to use a backoff rather than a fixed interval.

    • GOCBC-824: Enhanced timeout errors to contain more information and match up with the Response Time Observability RFC.

    • GOCBC-828: Added MaxExpiry to the CollectionSpec.

    • GOCBC-870: Updated GetAllIndexes to only fetch GSI indexes.

    • GOCBC-884: Improved logging to always log the cluster config when fetched.

    • GOCBC-888: Re-enabled HTTP dispatch traces.

    Fixed Issues

    • GOCBC-691: Fixed issue where operations on unknown collections (when using 6.5 developer preview) are not automatically retried.

    • GOCBC-757: Fixed issue where an array of arrays could cause a failure when using Get with Projections.

    • GOCBC-882: Fixed issue where an invalid cluster config would trigger a shutdown of the underlying core SDK causing operations to fail.

    • GOCBC-884: Fixed issue where UpsertUser sent an invalid request if a role was specified with no bucket.

    Known issues

    • GOCBC-879, GOCBC-890: Performing Cluster level operations (query, search, management APIs) before underlying cluster or bucket connections are ready causes errors to be returned. To mitigate this the err := WaitUntilReady(time.Duration, WaitUntilReadyOptions) operation can be used on either Cluster or Bucket which will either:

      1. Return no error if connections are setup and ready for use

      2. Return a TimeoutError if connections are not ready within the specified time limit.

    Version 2.1.0 (21 April 2020)

    Version 2.1.0 is a maintenance release for the Go SDK 2.0.0. This release contains updating to a new major release of the core part of the SDK.

    New Features and Behavioral Changes

    • GOCBC-843: Updated to the new version of gocbcore. This change includes a key behavioral change of no longer reporting non-configuration related connect time errors.

    • GOCBC-845: Add support for the WaitForReady operation, support waiting for the KeyValue service to be ready.

    Version 2.0.4 (21 April 2020)

    Version 2.0.4 is a maintenance release for the Go SDK 2.0.0.

    New Features and Behavioral Changes

    • GOCBC-844: Updated to the latest version of gocbconnstr.

    Fixed Issues

    • GOCBC-838: Fixed issue where HTTP endpoints were being used when SSL is enabled.

    • GOCBC-851: Fixed issue where ServerName was not being set on the tls.Config when SSL was use.

    • GOCBC-853: Fixed issue where using PasswordAuthenticator with a root CA and SSL would cause a panic.

    • GOCBC-831: Fixed issue where search consistency options were not being set in the request payload.

    Version 2.0.3 (17 March 2020)

    Version 2.0.3 is a maintenance release for the Go SDK 2.0.0.

    New Features and Behavioral Changes

    • GOCBC-662: The server requires that any subdoc xattr ops are at the beginning of the ops list. If the user provides an ops list containing subdoc xattr ops out of order, the SDK will now reorder it for them and then reorder it back again when it gets the result. This ensures that ContentAt works as expected.

    • GOCBC-700: Made improvements to errors returned from management operations. They now provide more contextual information.

    • GOCBC-716: SDK now returns a FlushNotEnabled error if bucket flush not enabled.

    • GOCBC-719: SDK now consistently creates tracing spans for all HTTP requests.

    • GOCBC-728: Added cluster level Ping operation.

    • GOCBC-807: Updated best effort retry strategy to use an exponential backoff calculator.

    • GOCBC-820: Removed context.Context from search index manager operations. Note that whilst this is a breaking change it was deemed best to break it and make sure any users who are using it know that they are using unused functionality.

    Fixed Issues

    • GOCBC-814: Fixed issue where search was looking for incorrect field in the JSON response.

    • GOCBC-817: Fixed issue where opening a bucket with the same name twice led to incorrect behaviour on both buckets.

    Version 2.0.2 (21 February 2020)

    Version 2.0.2 is an off-cycle release for the Go SDK 2.0.0.

    New Features and Behavioral Changes

    • GOCBC-805: Updated timeout behavior across the SDK to be consistent. If an operation level timeout is provided then it is used, otherwise the respective global timeout is used.

    Fixed Issues

    • GOCBC-804: Fixed issue with timeouts not being respected for HTTP requests, leading to them never timing out.

    Version 2.0.1 (19 February 2020)

    Version 2.0.1 is a maintenance release for the Go SDK 2.0.0.

    New Features and Behavioral Changes

    • GOCBC-775: Improve error message for when performing cluster level operations with no connections available.

    • GOCBC-776: Added support for KVDurableTimeout.

    • GOCBC-786: Improve error messages for the UserManager GetUser function.

    Fixed Issues

    • GOCBC-701: Fixed issue with enhanced prepared statements not being used.

    • GOCBC-702: Fixed issue with CA root certificates not being able to be provided.

    • GOCBC-759: Fixed issue with streaming results for HTTP based services timing out unexpectedly.

    • GOCBC-772: Fixed issue with many of the management API functions timing out immediately.

    • GOCBC-773: Fixed issue with queries that do not return rows (e.g. mutations) causing errors.

    • GOCBC-777: Fixed issue with failing operations causing nil pointers.

    • GOCBC-783: Fixed issue with Exists returning incorrectly if the document was recently deleted.

    • GOCBC-784: Fixed issue with Unlock returning a doc not found error instead of cas mismatch.

    • GOCBC-787: Fixed issue with some (xattr related) subdoc operations sending invalid packets.

    • GOCBC-789: Fixed issue with search index manager FreezePlan function using an invalid HTTP method.

    • GOCBC-790: Fixed issue with user manager sometimes parsing user role origins incorrectly.

    • GOCBC-796: Fixed issue with cccp poller hanging if the get cluster config op timed out.

    Version 2.0.0 (18 January 2020)

    Version 2.0.0 is the first release for the Go SDK 2.0.0.

    New Features and Behavioral Changes

    • GOCBC-510: Dropped support for connecting using the http scheme.

    • GOCBC-534: Added support for retry handling.

    • GOCBC-652: Added support for circuit breakers.

    • GOCBC-655: Added support for enhanced timeout errors providing more information about operations which timeout.

    • GOCBC-656: Added support for threshold logging tracer.

    • GOCBC-680: Updated how we expose and handle errors.

    • GOCBC-694: A large number of updates including: How query and analytics results are iterated. Minor renaming of various types. Moving search facets, sorting, and queries to a search subpackage. Removing serializers.

    • GOCBC-740: Updated expiry options to be time.Duration.

    • GOCBC-760: Moved authenticator to ClusterOptions.


    Numerous Alpha and Beta releases were made in the run-up to the 2.0 release, and although unsupported, the release notes and download links are retained for archive purposes here.

    Older Releases

    Although no longer supported, documentation for older releases continues to be available in our docs archive.