Couchbase .NET SDK 2.3.3 Now Available!

Today we are releasing a maintenance and bug fix release of the Couchbase .NET SDK. This is a follow up release to 2.3.0 and 2.3.1 (there is no 2.3.2 release) and we suggest you upgrade accordingly. While largely a bug fix release, there are a couple of minor, new features which we are releasing as well as an API rename which makes the older methods obsolete.

New Features and Changes

Asynchronous Batch Methods

We have added an new API of asynchronous methods for batching a number of operations on JSON documents. These allow you to use the familiar async/await paradigm to execute a list of operations in a non-blocking fashion:

Notice that we are specifying that the generic Type T is an object in this example? By doing this we can combine documents of varying types; if you were to constrain T to a more specific type then every document in the batch would need to be the same Type.

These methods have been added for the following operations:

  • GetDocumentsAsync: get a set of documents given a set of keys
  • UpsertAsync: update an existing set of docs or insert them if the do not exist
  • InsertAsync: insert a set of documents failing if they exist
  • RemoveASync: remove a set of documents
  • ReplaceAsync: replace a set of documents, failing if they do not exist

Allow programmatic configuration for IO services

Sometime back, we released a new IO provider called MUX IO, however we only supported configuration through App.config or Web.config files. Now you can programmatically your IO service:

A big thanks to community member Petr Drastil for submitting a PR for this feature!

Upgrade NewtonSoft package to 8.0.3

We have finally upgraded from version 6.0.8 to 8.0.3 largely in support for a .NET Core compliant JSON serializer.

Rename GetWithLock to GetAndLock

This was done so that we could have some consistency across the various Couchbase SDKs (Java, PHP, etc). All GetWithLock methods have been flagged as “obsolete” using the ObsoleteAttribute .aspx). If you are using these methods you will get a compiler warning. Note that these methods will not be removed until a major version (3.x for example) of the SDK is released.

IPv6 Support

You can now set a global configuration so that the client will use only IPv6 entries when resolving a Fully Qualified Domain Name (FQDN). I would label this an “experimental” feature in that it has not been exhaustively tested, so caveat emptor! Unless you are using a pure IPv6 network, I would sat away from this feature!

Known Issues

There is one known issue that was discovered late in testing; Sub-Document commands may fail with a NotImplementedException during failover/swap/rebalance scenarios. This will be fixed in a later release – you can read more about it in Jira.

Release Notes – Couchbase .NET client library – Version 2.3.3

  • [NCBC-1127] – Expose CAS in document fragments
  • [NCBC-1143] – Subdocument Exists always returns true
  • [NCBC-1146] – replace GetWithLock with GetAndLock
  • [NCBC-1148] – MemcachedBucket.CreateManager throws NotSupportedException
  • [NCBC-1149] – Correct issue in bucket reference counting
  • [NCBC-1151] – Subdocument – Singular Replace always fails
  • [NCBC-1154] – Calling ToString on QueryResult may throw NRE
  • [NCBC-1092] – Upgrade NewtonSoft dependency to 8.x
  • [NCBC-1116] – Add async/await methods for bulk operations
  • [NCBC-1118] – Allow programmatic configuration for IO services
  • [NCBC-1087] – IPv6 Support in Client Configuration
  • [NCBC-1150] – Subdocument – Lookup fails when getting hierarchical subdocument

Special Thanks

A special thanks to all community members who contributed to this release either by contributing a pull-request, answering or asking a question on forums or creating a bug report or feature request on jira, most notably Brant Burnett of CenterEdge Software.

How to get it

The SDK is available for download directly, through NuGet, or by cloning and pulling the Github repo:

Author

Posted by Jeff Morris, Senior Software Engineer, Couchbase

Jeff Morris is a Senior Software Engineer at Couchbase. Prior to joining Couchbase, Jeff spent six years at Source Interlink as an Enterprise Web Architect. Jeff is responsible for the development of Couchbase SDKs and how to integrate with N1QL (query language).

Leave a reply