Release Notes

2.4.4 (Nov. 19 2014)

  • Detect disconnected pooled sockets. This allows the connection pool to detect dead sockets which were closed by a server when they were idle. Sometimes servers will close connections to open idle sockets to save resources, or because of bugs in their implementations. This will fix some issues experienced with views where queries would randomly fail with LCB_NETWORK_ERROR or LCB_ESOCKSHUTDOWN, by first checking if the socket is alive before returning it back to the library's core. The libuv plugin does not implement this functionality yet.
  • Fix pillowfight --min-size bug. This fixes a bug where pillowfight would sometimes compare the min-size option to an uninitialized max-size option and round it down to that value; then would set the max-size option.
  • Don't ignore LCB_CNTL_DURABILITY_INTERVAL. Fix a bug where this interval would be ignored, if modified by the user; always reverting to 100 milliseconds.
  • Fix memory leak with HTTP requests using a request body. Requests (such as PUT and POST) that contained a request body would cause a memory leak as the library forgot to free them when the request object was destroyed.
  • Fix erroneous LCB_SUCCESS return when passed duplicate keys to lcb_durability_poll(). This would cause applications to mistakenly wait for a callback to arrive, when in fact the command had failed.
  • Add option to preserve vBucket ownership heuristics across configuration updates. This allows the learned configuration settings to persist between configuration updates. The default behavior (up to, and including this change) is to discard any learned configuration in favor of the explicitly new configuration passed to the server. This new option allows this information to be persisted when a new configuration update is received. This behavior is considered experimental, and is primarily intended to reduce the time it takes for the client to relearn the current node (typically under 1-2 seconds).
  • Relocate memcached packets on topology changes for memcached buckets. This enhances the behavior of the client when operating with a memcached bucket during a topology change. Previously the library would not relocate packets to new servers, resulting in errors for items that were now mapped to wrong nodes. The new behavior remaps the key to the new server using the updated ketama hashing. As a current restriction, the remapping will be performed based on the key of the item, not any hashkey parameter being employed.
  • Return error if ignored or conflicting options are found. This changes the behavior of the library to throw an error if a specific option field was filled in that did not make sense for a given command, for example, specifying a cas value using a LCB_ADD operation with lcb_store.
  • Fix issue when sending out large OBSERVE command. This would cause a partial command to be sent out if the size of the output packet was greater than 512 bytes. This has been fixed by dynamically growing the output buffer for OBSERVE.
  • Fix spurious timeouts when using lcb_durability_poll. This fixes an issue where sometimes the durability poll operation would prematurely time out.

2.4.3 (Oct. 21 2014)

  • Disable support for SSLv3. This works around the POODLE SSLv3 vulnerability by disabling support for anything below TLSv1.
  • Pillowfight enhancements. Several behavior changes were made to pillowfight in this version. These are:
    • The -l or -c -1 option is in effect by default. This means that by default pillowfight will run an infinite number of cycles. The previous behavior was to default to a single cycle, requiring an explicit --loop to ensure the workload ran for a considerable amount of time.
    • When multiple threads are used, the workload is divided among the threads, thus making it that each thread only operates on a subset of the data.
    • A --sequential option has been added to allow the workload to operate in sequence on the total number of items. This is useful when you want to load a bucket with many items.
    • A --start-at option has been added to allow the workload to specify an alternate range of keys, effectively allowing resumption of a previous run. The --start-at flag allows you to specify the lower bound number that will be used to generate keys. Thus a --num-items=20000 and a --start-at=10000 will generate keys from 10000 through 30000.
    • The population phase has now been merged with the general workload implementation. This means that all worker threads will participate in the population phase. The previous behavior limited the populate phase to a single thread.
    • If stdout is detected to be a terminal, a simple OPS/SEC meter will periodically write the estimated throughput to the screen.
  • Fix memory leak when using large read buffers. In the case where large read buffers are used and the iovec elements becomes sizable, the library might end up incorrectly caching some memory blocks for future use. This fix makes the blocks be cached at the allocator level, so that they are properly (re) utilized.
  • Use forward map (and other heuristics) to get a next node for an item after a not-my-vbucket reply. Since the server does not always guarantee that a given configuration is the most correct, the client must do some guesswork in order to properly map a node when it gets a not-my-vbucket, especially if the configuration says that the node is the correct one.

2.4.2 (Sep. 23 2014)

  • Mark the hashkey fields as being volatile. Usage of this field is not supported in many cluster systems and is thus not supported functionality. It exists primarily as a legacy from an older API .
  • Add "key stats" mode to lcb_CMDDSTATS. This adds an additional key stats mode to the lcb_stats3() API which interprets the key field as being a document ID for which information (such as expiry, status) should be retrieved, rather than a system statistics key. Similar functionality already exists in the Java client library as getKeyStats(). In addition to this feature, a cbc stats --keystats option is also provided to employ this functionality from the command line.
  • Add more details about replica nodes in the cbc hash command.
  • Add lcb_cntl() setting to retrieve bucket name. Previously the library did not have a means by which the bucket name could be retrieved. Using the LCB_CNTL_BUCKETNAME setting, the bucket name will now be returned.

2.4.1

  • Implement mcflush subcommand for cbc. This was removed in the cbc rewrite as the previous flush command.
  • Requests issued to an invalid replica via lcb_get_replica() should fail with the LCB_NO_MATCHING_SERVER_CODE. Previously this sometimes went through due to an incorrect bounds checking in the lcbvb_vbreplica() function.
  • Fixed a memory leak in lcb_get_replica() when the operation would fail.
  • Fix memory leak in lcb_sched_fail() when extended commands are in the pipeline
  • Provide lcb_dump() function call to dump state information about a client handle. The function call itself is currently marked as volatile and the output format is very much likely to change.
  • Fix ratio argument in cbc-pillowfight. This ensures that the ratio argument will truly determine the ratio of gets to sets.
    • Priority: Minor
  • Fix crash when HTTP request is retried. This may take place during topology changes
  • Allow simple host-port string in connection string, giving it an implicit http:// scheme. This allows easier backwards compatibility with some application
  • Update some SSL options to better reflect server 3.0 functionality The old capath option has been renamed to certpath to indicate that the path is not to the signing authority, but to the self-signed server certificate generated by the server itself. Additionally the no_verify option has been hidden.

2.4.0 GA

  • [major] Attempt to retry items that are mapped to a non-existent node in a degraded cluster. Rather than returning LCB_NO_MATCHING_SERVER the behavior should be to wait for the item to succeed and attempt to fetch a new cluster configuration.

    In order to control how such 'orphaned' commands are handled, a new value has been added to the lcb_RETRYMODEOPTS called LCB_RETRY_ON_MISSINGNODE which dictates how commands should be rescheduled if the associated vbucket has no master. The default is to retry the command until it times out, but by setting this value to 0 (See LCB_CNTL_RETRYMODE) it may only be attempted once, causing 'fail fast' behavior in such a case.
  • [major] Don't throttle config requests based on initial file-based config. This allows the client to quickly recover from a stale config cache without waiting for the LCB_CNTL_CONFDELAY_THRESH interval to elapse. Prior to this fix, a client would appear to "not recover" if bootstrapping from a stale cache. In reality the client would eventually recover but was waiting for the delay threshold to elapse.
  • [major] Ignore NOT_MY_VBUCKET config payloads if CCCP provider is disabled. This allows the client to circumvent any possible bugs in the CCCP response payload and rely entirely on the HTTP config. It also allows 'rewriting' proxies like confsed to function.

2.4.0-beta

  • [major] Better error reporting for SSL failures. This adds new error codes ( LCB_SSL_ERROR, LCB_SSL_CANTVERIFY) which are returned on initialization and verification failures respectively.
  • [minor] Communication via legacy memcached servers is possible by using the memcached:// scheme in the connection string.
  • [minor] Environment variables understood by the library are now documented in their own section.
  • [major] Add lcb_get_node() function to retrieve addresses for various nodes in the cluster. This deprecates the lcb_get_host(), lcb_get_port() and lcb_get_server_list() functions as they are constrained to only return information about the administrative API. The new function is configurable to return information about various ports.
  • [major] The dsn field in the lcb_create_st structure has been renamed to connstr.
  • [major] An HTTP request which has followed redirects will cause the lcb_wait() function to never return. This bug was introduced in 2.4.0-DP1 and has now been fixed.
  • [minor] lcb_get_server_list() function now returns updated information from the current cluster configuration. Previously this would only return a node from the list specified during initial creation.
  • [minor] Provide additional error classifiers. Two error classifiers have been added, they are:
    • LCB_ERRTYPE_SRVLOAD which indicates that the server is likely under high load.
    • LCB_ERRTYPE_SRVGEN which indicates that the error is a direct reply from the server. This code can help distinguish between client and server generated return codes.
  • [major] Provide HTTP keepalive and connection pooling for HTTP requests. This allows the client to reuse an HTTP connection for multiple requests rather than creating a new connection and closing it for each operation.

    The functionality may be controlled via the LCB_CNTL_HTTP_POOLSIZE setting which limits how many open connections (per server) to maintain inside the client. Setting this value to 0 will disable pooling and restore old behavior.
  • [major] Properly schedule next invocations for retry queue. A bug was introduced in 2.4.0-dp1 which would cause the next tick callback to be invoked in what is effectively a busy loop. This would be reflected in higher CPU load and less throughput during topology changes.
  • [major] Return error if empty key is passed to an operation. Empty keys will cause the server to drop the connection. The error code returned is the newly added LCB_EMPTY_KEY
  • [minor] Provide setting to disable refreshing the configuration when an HTTP API error is encountered (from one of the HTTP callback functions). This adds the LCB_CNTL_HTTP_REFRESH_CONFIG_ON_ERROR setting.
  • [major] Fix bug where the CCCP provider may prematurely fail, activating the HTTP provider

2.4.0-dp1 (2014-06-18)

Changes affecting older APIs

  • [minor] Make run_event_loop and stop_event_loop private. These functions may no longer be used from within an application to start/stop the event loop. lcb_wait() and lcb_wait3() should be used instead.
  • [major] Deprecate the lcb_set_XXX functions. lcb_set_timeout and some other calls have been deprecated in favor of the lcb_cntl() interface. These functions will still work but will cause the compiler to print a deprecation warning.
  • [minor] lcb_socket_t is typedefed to a DWORD on windows. In previous versions this was an int.
  • [minor] Connecting to a standalone memcached instance is currently no longer supported.
  • [major] lcb_set_error_callback() has been deprecated. Applications should use the new lcb_set_bootstrap_callback() and/or operation callbacks to determine success/failure status.
  • [major] lcb_get_last_error() has been deprecated. Error information is always returned in the operation callback
  • [major] Disable the sending of GETQ packets. The format of this command is cumbersome to deal with and in most uses cases is actually slightly less efficient on the network. Note that this does not change the API of the actual lcb_get() call, but simply changes the format of the packets sent over the wire.
  • [major] The IOPS API has been changed. This is considered volatile interface and may subsequently change in the future as well.

New APIs added in 2.4.0 extending existing functionality

These changes extend existing features with enhanced APIs

  • [major] Additional APIs for lcb_cntl(). These consist of helper functions to make it easier to use simple types or strings rather than pointers, if possible. These functions are lcb_cntl_string(), lcb_cntl_setu32() and lcb_cntl_getu32()
  • [minor] Provide extended version of lcb_wait(). A new function called lcb_wait3() has been added which offers additional options with respect to running the event loop. Specifically it offers to bypass the check for pending operations which lcb_wait() executes. This is both more performant and allows us to wait for operations which are not explicitly scheduled.
  • [major] Provide API to request a configuration refresh. Sometimes it is necessary to force the client to request a new configuration, for example in certain failover conditions. A new API called lcb_config_refresh() has been added, and should be used in conjunction with lcb_wait3().
  • [major] Provide bootstrapping notification callback This provides an explicit lcb_set_bootstrap_callback() to definitively determine whether the client has received its initial configuration (and thus may now start performing operations) or whether it failed (and thus must be reinitialized). This deprecates the common use case of lcb_set_error_callback().
  • [major] New vBucket interface/API. This API is used internally and exposed as volatile inside the public header files. It provides extended features, a more concise API, and is compatible with the upcoming Couchbase 3.0 config format. Note that file-based configuration caches written by this version of the library are incompatible with previous versions, however this version may read caches generated by previous versions. This is because this version generates a stripped-down version of the "terse" configuration style.
  • [major] Extended detailed error codes. These error codes expose more detail about the NETWORK_ERROR and CONNECT_ERROR codes returned by previous versions of the library. The extended codes are not returned by default and must be explicitly enabled in order to retain backwards compatibility with applications which rely on the older error codes.

New Features in 2.4.0

  • [major] Connection Strings (aka "dsn") feature for instance creation. This adds a new version of the lcb_create_st structure which is passed a URI-like string rather than a semicolon-delimited list of hosts. This string is used to provide options and the list of hosts that the library should connect to. For example, couchbase://default/localhost&compression=off
  • [major] SSL transport support for Couchbase 3.0 Enterprise. Couchbase 3.0 enterprise features the ability to encrypt communications between the client and the server using the SSL protocol. SSL protocol support in libcouchbase.
  • [major] Retry queue for failed operations. The retry queue is used as a place to place operations which have failed internally and which should be retried within a certain amount of time. This also provides options on which commands should be retried.
  • [minor] Compression/JSON flag (aka Datatype) support This adds support for a future feature of Couchbase server which will feature transparent compression. This feature also allows the server to signal to the library if a document is JSON or not. The compression feature may be disabled at compile-time, and may also be modified at runtime by setting compression=off in either the connection string or via lcb_cntl_setstring(instance, "compression", "off")
  • [major] Experimental scheduling API. This API replaces most of the older operation APIs with a scheduling API. These APIs are called with one command at a time and insert the resultant packet into a pipeline. The user may "schedule" the commands or "fail" the pipeline if a certain request has failed to be scheduled.

    This API also provides a common ABI header for commands so that they may easily be used via type-punning, or wrapped as a class hierarchy in C++.

    This API is currently considered volatile but will be the basis of the upcoming libcouchbase 3.0 API. The header file is <libcouchbase/api3.h>
  • [major] Raw memcached packets may be sent to the library and have a callback invoked when their responses have been received. This adds an lcb_pktfwd3() API. This requires the new scheduling API.

Bug Fixes in 2.4.0

  • [major] select plugin may endlessly loop in some cases The plugin may loop if there was a long timeout from the future .
  • [major] Do not break TCP connections on topology changes unless ejected from cluster. This ensures that nodes which are still part of the cluster have their TCP connections remain in tact despite being shifted in their server index values. Packets which have been sent to the wrong vBucket are silently ignored and rescheduled to their appropriate destination. This decreases load significantly on the client, network, and cluster during topology changes.
  • [major] Use new-style "Terse" URI format when requesting a configuration over HTTP. This uses the HTTP configuration format over the new /pools/default/bs/default rather than the older /pools/default/bucketsStreaming/default form. The former form is much more efficient on the cluster side. If the new URI form is not supported (i.e. the server responds with an HTTP 404) the older form will be used instead. You may modify this behavior by setting the LCB_CNTL_HTCONFIG_URLTYPE setting via lcb_cntl().
  • [minor] The cmake/configure script now accepts the LDFLAGS, CPPFLAGS, CFLAGS, CXXFLAGS, CC, and CXX settings both within the environment and the commandline, so the forms of CC=clang ./cmake/configure and ./cmake/configure CC=clang are equivalent.
  • [minor] The pillowfight tool will now print latencies between 1-10ms in resolutions of 100us.

Metadata and Packaging Changes in 2.4.0

  • [major] Use Doxygen for API documentation. This replaces the manpages for API documentation with Doxygen. Doxygen is a free and portable documentation system which may be obtained from your distribution or at http://doxygen.org. To generate the documentation from the source tree, simply run doxygen from the source root directory. To generate internal documentation, run ./docs/gen_internal_apidoc.sh.
  • [major] Add interface attributes to all API calls This properly documents all API calls with a certain API stability level such as committed (for stable APIs), uncomitted for APIs which may, but are not likely to change, and volatile for APIs which are likely to be changed or removed.
  • [major] Public header files have been reorganized This changes the layout of the header files from previous versions. This should not affect applications as applications should only ever include the main <libcouchbase/couchbase.h> file.

    the following files have been removed from the <libcouchbase/*> header directory:
    * `types.h` - Merged into other header files
    * `arguments.h` - now a part of `couchbase.h`
    * `callbacks.h` - now a part of `couchbase.h`
    * `debug.h` - unused and obsolete
    * `durability.h` - now a part of `couchbase.h`
    * `behavior.h` - Merged into `deprecated.h`
    * `sanitycheck.h` - Merged into `deprecated.h`
    * `timings.h` - Part of `couchbase.h`
    * `compat.h` - Part of `deprecated.h`

    The following files have been added into the <libcouchbase/*> directory. Unless otherwise noted, these files are included by <libcouchbase/couchbase.h>:
    * `api3.h` - Volatile proposed 3.0 API. **Not included by default**
    * `cxxwrap.h` - Contains the implementation for the deprecated C++ wrappers
    * `deprecated.h` - Contains deprecated APIs
    * `iops.h` - Contains the IO integration APIs
    * `pktfwd.h` - Contains the packet forwarding API. **Not included by default**
    * `vbucket.h` - Contains the vBucket mapping API. **Not included by default**
  • OpenSSL is now a base dependency for the library. This may be disabled at configure time via --enable-ssl=no. See ./configure --help.
  • Snappy compression library is bundled and optionally compiled. This is left out by default as the configure script will search for a system installed libsnappy. Snappy provides the compression feature needed for compressing and inflating data between client and server. It may be disabled at compile-time via --enable-snappy=no
  • [minor] libvbucket has been fully integrated into libcouchbase from the forked libvbucket package and, lives fully as part of the library. The public vBucket API may be found in <libcouchbase/vbucket.h>.
  • [minor] As an alternative to the cross-platform lcb_uintNN_t typedefs, a shorter (and more standards compliant) alternative lcb_UNN typedefs are provided, thus instead of lcb_uint32_t you may use lcb_U32. The full listing of cross platform typdefs may be found inside <libcouchbase/sysdefs.h>

2.3.1 (2014-05-08)

  • [major] CCBC-404: Segfault in connmgr_invoke_request Occasionally a segmentation fault would happen when a connection was being released as a result of a connection failure. This was because of invalid list tracking.
  • [major] CCBC-395: Add lcb_cntl() interface for configuration cache Configuration cache options may be set after instantiation using lcb_cntl() with the new LCB_CNTL_CONFIGCACHE operation. The old-style lcb_create_compat creation path is deprecated.
  • [major] CCBC-394: Get-with-replica occasionally crashes on Windows and UV during topology changes. This was due to not allocating a buffer if one did not exist.
  • [major] CCBC-392: ABI compatibility broken between 2.x and 2.3 for lcb_create_compat. This has been fixed by symbol aliasing between versions. Developers are recommended to use the lcb_cntl() API to set the configuration cache, as specified in CCBC-395
  • [major] CCBC-385: Failed assertion on get-with-replica when connection fails. If a connection fails with a CMD_GET_REPLICA command still in the queue an assertion failure will crash the library. This has been fixed by handling the opcode in the failout_single_request function.
  • [major] CCBC-384: Unknown Winsock error codes crash application. This was fixed by providing proper handlers for Winsock codes which were not explicitly converted into their POSIX equivalents.
  • [major] CCBC-376: Fix memory leak in configuration parsing. A leak was introduced in version 2.3.0 by not freeing the JSON pool structure. This has been fixed in 2.3.1
  • [minor] CCBC-370: lcb_get_host and lcb_get_port may return host-port combinations from different servers. If multiple servers are listening on different ports this may result in yielding an invalid endpoint by combining the output from those two functions. This has been fixed in 2.3.1 by returning the host and port from the first host, in lieu of a currently-connected REST endpoint.
  • [minor] CCBC-368: Initial bootstrapping failure may mask LCB_BUCKET_ENOENT calls with LCB_ETIMEDOUT. This has been fixed by not retrying configuration retrieval if an explicit HTTP 404 code is received. Note that when using bootstrap over memcached, a missing bucket may still be manifest as LCB_AUTH_ERROR.
  • [minor] CCBC-367: Ensure lcb_get_host does not return NULL when the associated lcb_t is of LCB_TYPE_CLUSTER. This would cause crashes in some applications which relied on this function to not return NULL.
  • [major] CCBC-389: Fixed Spurious timeouts being delivered in asynchronous use cases. In applications which do not use lcb_wait() the library will potentially time out commands internally triggering an erroneous configuration refresh. While this issue would not end up failing operations it will cause unnecessary network traffic for retrieving configurations. Applications using lcb_wait() are not affected as that function resets the timeout handler.
  • [major] CCBC-332, CCBC-364: Compare configuration revision information for memcached cluster bootstrap. Previously we would refresh the configuration upon receipt of any new configuration update from memcached. This is fixed in 2.3.1 where the configuration will only be applied if it is deemed to be newer than the current configuration. With memcached bootstrap this is only true if the configuration's rev field is higher than the current one.

2.3.0 GA (2014-04-07)

  • [major] CCBC-152: Provide a master-only observe option. This adds a new struct version to the lcb_observe_cmd_t which allows to select only the master node. One can use this to efficiently check if the key exists (without retrieving it). It also allows one to get the CAS of the item without fetching it.
  • [major] CCBC-281: Fix partial scheduling during multi operations. Previously the library would deliver spurious callbacks if multiple operations were scheduled with a single command and one of the operations could not be mapped to a server. This fixes this behavior and ensures that callbacks are only invoked for items if the entire API call succeeded.
  • [major] CCBC-150: Multi-packet commands will no longer deliver spurious callbacks on failure. Previously these commands would be relocated to the same server during a configuration change, resulting in multiple callbacks for the same command. In this case the client would think all the commands had been completed, and when the next response arrived it would incorrectly map it to a different request.
  • [minor] CCBC-327: Fix assumption of vbucket_compare() only returning if a diff exists. This function actually returns a non-NULL pointer always unless it cannot allocate more memory. This bug was introduced with the DP1 release.
  • [minor] CCBC-326: Memcached buckets should use streaming config. This was left unchecked in the DP1 release and has now been fixed.
  • [major] CCBC-351: Enhance performance for configuration parsing. In previous versions receiving multiple configurations at once would cause CPU spikes on slower systems. The configuration parser code has been optimized to alleviate this issue.
  • [minor] CCBC-350: Provide lcb_cntl() API to retrieve the SCM changeset used by the currently loaded binary. This is a more effective way to get the revision as it does not depend on the specific headers the library was compiled with.
  • [major] CCBC-340: Correctly parse "", "0" and "1" for environment variables. In previous versions having the entry set to an empty string or 0 would still be treated by the library as a true value for various environment variables. This has been fixed so that clear "False" values such as the empty string or 0 are treated as such.

2.3.0-dp1 (2014-02-04)

  • [major] CCBC-234: Implementation of[Cluster Configuration Carrier Publication][cccp-wiki]. This is the new and more efficient way to bootstrap from a cluster using the native memcached protocol and is quicker than the previous HTTP bootstrap mechanism, dramatically improving startup times and reducing load on the server. This feature is available in server verions 2.5 and greater. The existing HTTP configuration is still supported and will be employed as a fallback in the event that CCCP is not supported.

    In conjunction with this, a new struct version has been added to the lcb_create_st parameters structure for use with lcb_create. This allows you to get more control over how the client is initialized:
    lcb_t instance;
    struct lcb_create_st options;
    lcb_config_transport_t enabled_transports = {
        LCB_CONFIG_TRANSPORT_CCCP,
        LCB_CONFIG_TRANSPORT_LIST_END
    };
    memset(&options, 0, sizeof(options));
    options.version = 2;
    options.v.v2.mchosts = "example.com:11210";
    options.v.v2.transports = enabled_transports;
    lcb_error_t rc = lcb_create(&instance, &options);
    if (rc != LCB_SUCCESS) {
        fprintf(stderr, "Failed to create instance: %s\n", lcb_strerror(instance, rc));
    }

    The above snippet will configure a client to always use the CCCP protocol and never attempt to fall back on HTTP

    The CCCP implementation required a significant rewrite in how sockets were created and re-used. Particularly, a connection pooling feature was implemented.

    Additionally, the cbc command now has an additional -C option which accepts the preferred configuration mechanism to use.
  • [major] CCBC-305: Implement logging hooks.

    This improvements adds various levels of diagnostic logging with the library itself. It may be utilized via the environment (by setting the LCB_LOGLEVEL environment variable to a positive integer -- the higher the number the more verbose the logging).

    Integrators may also use the logging API specified in <libcouchbase/types.h> to proxy the library's logging messages into your own application.

    Current events logged include connection initialization, destruction, connection pool management, configuration changes, and timeouts.

    By default the library is silent.
  • [major] CCBC-316: Allow per-node bootstrap/config timeouts. This change allows more finer grained control over how long to wait per-node to receive updated configuration info. This setting helps adjust the initial and subsequent bootstrap processes to help ensure each node gets a slice of time.
  • [major] CCBC-297: Handle spurious EWOULDBLOCK on UV/Win32 This issue caused odd errors on Windows when large amounts of data would be received on the socket.

2.2.0 (2013-10-05)

  • [major] CCBC-169 Handle 302 redirects in HTTP (views, administrative requests). By default the library will follow up to three redirects. Once the limit reached the request will be terminated with code LCB_TOO_MANY_REDIRECTS. Limit is configurable through LCB_CNTL_MAX_REDIRECTS. If set to -1, it will disable redirect limit.
      int new_value = 5;
      lcb_cntl(instance, LCB_CNTL_SET, LCB_CNTL_MAX_REDIRECTS, &new_value);
  • [major] CCBC-243 Replace isasl with cbsasl, the latter has implemented both PLAIN and CRAM-MD5 authentication mechanisms.
    • LCB_CNTL_MEMDNODE_INFO command updated to include effective SASL mechanism:
          cb_cntl_server_t node;
          node.version = 1;
          node.v.v1.index = 0; /* first node */
          lcb_cntl(instance, LCB_CNTL_GET, LCB_CNTL_MEMDNODE_INFO, &node);
          if (node.v.v1.sasl_mech) {
              printf("authenticated via SASL '%s'\n",
                     node.v.v1.sasl_mech);
          }
    • It is also possible to force specific authentication mechanism for the connection handle using LCB_CNTL_FORCE_SASL_MECH command:
          lcb_cntl(instance, LCB_CNTL_SET, LCB_CNTL_FORCE_SASL_MECH, "PLAIN");
  • [major] CCBC-286 libuv plugin: use same CRT for free/malloc
  • [major] CCBC-288 Fail NOT_MY_VBUCKET responses on timeout
  • [major] CCBC-275 Do a full purge when negotiation times out. In this case we must purge the server from all commands and not simply pop individual items.
  • [major] CCBC-275 Reset the server's buffers upon reconnection. This fixes a crash experienced when requesting a new read with the previous buffer still in tact. This was exposed by calling lcb_failout_server on a timeout error while maintaining the same server struct.
  • [major] CCBC-282 Make server buffers reentrant-safe. When purging implicit commands, we invoke callbacks which may in turn cause other LCB entry points to be invoked which can shift the contents and/or positions of the ringbuffers we're reading from.
  • [major] CCBC-204, CCBC-205 Stricter/More inspectable behavior for config cache. This provides a test and an additional lcb_cntl operation to check the status of the configuration cache. Also it switches off config cache with memcached buckets.
      int is_loaded;
      lcb_cntl(instance, LCB_CNTL_GET, LCB_CNTL_CONFIG_CACHE_LOADED, &is_loaded);
      if (is_loaded) {
          printf("Configuration cache saved us a trip to the config server\n");
      } else {
          printf("We had to contact the configuration server for some reason\n");
      }
  • [major] CCBC-278 Use common config retry mechanism for bad configcache. This uses the same error handling mechanism as when a bad configuration has been received from the network. New LCB_CONFIG_CACHE_INVALID error code to notify the user of such a situation
  • [major] CCBC-274 Handle getl/unl when purging the server (thanks Robert Groenenberg)
  • [major] Don't failout all commands on a timeout. Only fail those commands which are old enough to have timed out already.
  • [major] CCBC-269 Don't record and use TTP/TTR from observe. Just poll at a fixed interval, as the responses from the server side can be unreliable.
  • [minor] Allow hooks for mapping server codes to errors. This also helps handle sane behavior if a new error code is introduced, or allow user-defined logging when a specific error code is received.
      lcb_errmap_callback default_callback;
      lcb_error_t user_map_error(lcb_t instance, lcb_uint16_t in)
      {
        if (in == PROTOCOL_BINARY_RESPONSE_ETMPFAIL) {
          fprintf(stderr, "temporary failure on server\n");
        }
        return default_callback(instance, in);
      }
      ...
      default_callback = lcb_set_errmap_callback(conn, user_map_error);
  • [minor] Add an example of a connection pool. See example/instancepool directory
  • [minor] CCBC-279 Force lcb_wait return result of wait operation instead of lcb_get_last_error. It returns last_error if and only if the handle is not yet configured
  • [minor] CCBC-284 cbc-pillowfight: compute item size correctly during set If minSize and maxSize are set to the same value it can sometimes crash since it may try to read out of memory bounds from the allocated data buffer.
  • [minor] CCBC-283 Apply key prefix CLI option in cbc-pillowfight
  • [minor] Add --enable-maintainer-mode. Maintainer mode enables --enable-werror --enable-warnings --enable-debug, forces all plugins to be installed and forces all tests, tools, and examples to be built
  • [minor] CCBC-255 Expose LCB_MAX_ERROR to allow user-defined codes

2.1.3 (2013-09-10)

  • [minor] Updated gtest to version 1.7.0. Fixes issue with building test suite with new XCode 5.0 version being released later this month.
  • [major] CCBC-265 Do not try to parse config for LCB_TYPE_CLUSTER handles. It fixes timouts for management operations (like 'cbc bucket-create', 'cbc bucket-flush', 'cbc bucket-delete' and 'cbc admin')
  • [major] CCBC-263 Skip unfinished SASL commands on rebalance. During rebalance, it is possible that the newly added server doesn't have chance to finish SASL auth before the cluster will push config update, in this case packet relocator messing cookies. Also the patch makes sure that SASL command/cookie isn't mixing with other commands
  • [major] Use cluster type connection for cbc-bucket-flush. Although flush command is accessible for bucket type connections, cbc-bucket-flush doesn't use provided bucket name to connect to, therefore it will fail if the bucket name isn't "default".
  • [major] Allow to make connect order deterministic. It allows the user to toggle between deterministic and random connect order for the supplied nodes list. By default it will randomize the list.
  • [major] Do not allow to use Administrator account for LCB_TYPE_BUCKET
  • [major] CCBC-258 Fig segmentation faults during tests load of node.js. Sets inside_handler on socket_connected. Previously we were always using SASL auth, and as such, we wouldn't flush packets from the cmd_log using server_send_packets (which calls apply_want). apply_want shouldn't be called more than once per event loop entry -- so this sets and unsets the inside_handler flag.
  • [major] Added support of libuv 0.8
  • [major] Close config connection before trying next node. It will fix asserts in case of the config node becomes unresponsive, and the threshold controlled by LCB_CNTL_CONFERRTHRESH and lcb_cntl(3)

2.1.2 (2013-08-27)

  • [major] CCBC-253, CCBC-254 Use bucket name in SASL if username omitted. Without this fix, you can may encounter a segmentation faults for buckets, which are not protected by a password.
  • [major] Preserve IO cookie in options_from_info when using v0 plugins with user-provided IO loop instance. This issue was introduced in 2.1.0.
  • [minor] Display the effective IO backend in 'cbc-version'. This is helpful to quickly detect what is the effective IO plugin on a given system.

2.1.1 (2013-08-22)

  • [minor] Use provided credentials for authenticating to the data nodes. With this fix, it is no longer possible to use Administrator credentials with a bucket. If your configuration does so, you must change the credentials you use before applying this update. No documentation guides use of Administrator credentials, so this change is not expected to affect few, if any deployments.
  • [major] CCBC-239 Do not use socket after failout. Fixes segmentation faults during rebalance.
  • [minor] CCBC-245 Distribute debug information with release binaries on Windows
  • [minor] CCBC-248 Do not disable config.h on UNIX-like platforms. It fixes build issue, when application is trying to include plugins from the tarball.
  • [major] CCBC-192 Skip misconfigured nodes in the list. New lcb_cntl(3couchbase) added to control whether the library will skip nodes in initial node list, which listen on configuration port (8091 usually) but doesn't meet required parameters (invalid authentication or missing bucket). By default report this issue and stop trying nodes from the list, like all previous release. Read more at man page lcb_cntl(3couchbase) in section LCB_CNTL_SKIP_CONFIGURATION_ERRORS_ON_CONNECT
  • [major] CCBC-246 Fallback to 'select' IO plugin if default plugin

    cannot be loaded. On UNIX-like systems, default IO backend is 'libevent', which uses third-party library might be not available at the run-time. Read in lcb_cntl(3couchbase) man page in section LCB_CNTL_IOPS_DEFAULT_TYPES about how to determine effective IO plugin, when your code chose to use LCB_IO_OPS_DEFAULT during connection instantiation. The fallback mode doesn't affect application which specify IO backend explicitly.

2.1.0 (2013-08-17)

  • [major] New backend select. This backend is based on the select(2) system call and its Windows version. It could be considered the most portable solution and is available with the libcouchbase core.
  • [major] CCBC-236 New backend libuv. This backend previously was part of the couchnode project and is now available as a plugin. Because libuv doesn't ship binary packages there is no binary package libcouchbase2-libuv. You can build plugin from the source distribution, or through the libcouchbase-dev or libcouchbase-devel package on UNIX like systems.
  • [major] New backend iocp. This is a Windows specific backend, which uses "I/O Completion Ports". As a part of the change, a new version of plugin API was introduced which is more optimized to this model of asynchronous IO.
  • [major] CCBC-229 Fixed bug when REPLICA_FIRST fails if first try does not return key
  • [major] CCBC-228 Fixed bug when REPLICA_SELECT didn't invoke callbacks for negative error codes
  • [major] CCBC-145 API for durability operations. This new API is based on lcb_observe(3) and allows you to monitor keys more easily. See the man pages lcb_durability_poll(3) and lcb_set_durability_callback(3) for more info.
  • [major] New configuration interface lcb_cntl(3) along with new tunable options of the library and connection instances. In this release the following settings are available. See the man page for more information and examples.:
    • LCB_CNTL_OP_TIMEOUT operation timeout (default 2.5 seconds)
    • LCB_CNTL_CONFIGURATION_TIMEOUT time to fetch cluster configuration. This is similar to a connection timeout (default 5 seconds)
    • LCB_CNTL_VIEW_TIMEOUT timeout for couchbase views (default 75 seconds)
    • LCB_CNTL_HTTP_TIMEOUT timeout for other HTTP operations like RESTful flush, bucket creating etc. (default 75 seconds)
    • LCB_CNTL_RBUFSIZE size of the internal read buffer (default 32768 bytes)
    • LCB_CNTL_WBUFSIZE size of the internal write buffer (default 32768 bytes)
    • LCB_CNTL_HANDLETYPE type of the lcb\_t handler (readonly)
    • LCB_CNTL_VBCONFIG returns pointer to VBUCKET_CONFIG_HANDLE (readonly)
    • LCB_CNTL_IOPS get the implementation of IO (lcb_io_opt_t)
    • LCB_CNTL_VBMAP get vBucket ID for a given key
    • LCB_CNTL_MEMDNODE_INFO get memcached node info
    • LCB_CNTL_CONFIGNODE_INFO get config node info
    • LCB_CNTL_SYNCMODE control synchronous behaviour (default LCB_ASYNCHRONOUS)
    • LCB_CNTL_IP6POLICY specify IPv4/IPv6 policy (default LCB_IPV6_DISABLED)
    • LCB_CNTL_CONFERRTHRESH control configuration error threshold (default 100)
    • LCB_CNTL_DURABILITY_TIMEOUT durability timeout (default 5 seconds)
    • LCB_CNTL_DURABILITY_INTERVAL durability polling interval (default 100 milliseconds)
    • LCB_CNTL_IOPS_DEFAULT_TYPES get the default IO types
    • LCB_CNTL_IOPS_DLOPEN_DEBUG control verbose printing of dynamic loading of IO plugins.

2.0.7 (2013-07-10)

  • [major] CCBC-183 Improve lcb_get_replica(). Now it is possible to choose between three strategies:
    1. LCB_REPLICA_FIRST: Previously accessible and now the default, the caller will get a reply from the first replica to successfully reply within the timeout for the operation or will receive an error.
    2. LCB_REPLICA_ALL: Ask all replicas to send documents/items back.
    3. LCB_REPLICA_SELECT: Select one replica by the index in the configuration starting from zero. This approach can more quickly receive all possible replies for a given topology, but it can also generate false negatives.

    Note that applications should not assume the order of the replicas indicates more recent data is at a lower index number. It is up to the application to determine which version of a document/item it may wish to use in the case of retrieving data from a replica.

2.0.6 (2013-05-07)

  • [major] CCBC-188 Fix segfault when rebalancing When a (!connected) server is reconnected, the tasks in its "pending" buffer will be moved into "output" buffer. If its connection is broken again immediately, relocate_packets() will go to wrong path.
  • [major] CCBC-202 Don't try to switch to backup nodes when timeout is reached
  • [major] CCBC-188 Check if SASL struct is valid before disposing
  • [major] Fix compile error with sun studio "src/event.c", line 172: error: statement not reached ( E_STATEMENT_NOT_REACHED)
  • [major] Don't invoke HTTP callbacks after cancellation, because user code might assume a previously-freed resource is still valid
  • [minor] CCBC-179 Added an example to properly use the bucket credentials for authentication instead of administrator credentials
  • [minor] example/yajl/couchview.c: pass cookie to the command Fixes coredump when executing ./examples/yajl/couchview
  • [minor] CCBC-201 Add Host header in http request http://cbugg.hq.couchbase.com/bug/bug-555 points out that Host is a required field in HTTP 1.1

2.0.5 (2013-04-05)

  • [minor] Try to search the --libdir for modules if dlopen fails to find the module in the default library path
  • [minor] CCBC-190 New compat mode (experimental) for configuration caching. See man lcb_create_compat()
  • [minor] Manpage fixes
  • [minor] Fix build on FreeBSD (http://review.couchbase.org/25289)
  • [minor] Fix reconnecting issues on windows (http://review.couchbase.org/25170 and

    http://review.couchbase.org/25155)

  • [minor] pillowfight example updated to optionally use threads

2.0.4 (2013-03-06)

  • [minor] CCBC-185 The bootstrap URI is not parsed correctly
  • [minor] CCBC-175 Work properly on systems where EWOULDBLOCK != EAGAIN
  • [critical] CCBC-180 Segmentation fault when the hostname resolved into several addresses and first of them reject couchbase connections.
  • [major] CCBC-182 The library stops iterating backup nodes list if the next one isn't accessible.
  • [major] CCBC-147 Fixed illegal memory access in win32 plugin
  • [minor] CCBC-178 Build error on solaris/sparc: -Werror=cast-align

2.0.3 (2013-02-06)

  • [minor] bypass SASL LIST MECH
  • [minor] Shrink internal lookup tables (and reduce the size of lcb_t)
  • [minor] Add a new library: libcouchbase_debug.so (see include/libcouchbase/debug.h) which is a new library that contains new debug functionality.
  • [minor] Added manual pages for the library
  • [major] CCBC-153 Reset internal state on lcb_connect(). Allow caller to use lcb_connect() multiple times to implement reconnecting using the same lcb_t instance. Also it sets up the initial-connection timer for users who don't use lcb_wait() and drive IO loop manually.
  • [major] CCBC-171 Invalid read in libevent plugin, when the plugin compiled in 1.x mode
  • [critical] CCBC-155 Observe malfunctions in the case of multiple keys and server failure
  • [major] CCBC-156 The ep-engine renders meaningful body for observe responses only if status code is 0 ( PROTOCOL_BINARY_RESPONSE_SUCCESS). We shouldn't interpret response body in other cases, just decode & failout request instead. Also we shouldn't retry observe commands on PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET, because it can cause the client to loop infinitely
  • [major] CCBC-145 KV Durability operation API. Async APIs added to allow the checking of the durability (replication and persistence) status of a key, and to notify the user when a specific criteria has been satisfied.

2.0.2 (2013-01-04)

  • [major] CCBC-150 commands sent to multiple servers fail to detect the respose if mixed with other commands.
  • [minor] CCBC-143 'cbc version' reports that uses 2.0.0, but really installed with 2.0.1. Minor but confusing issue.
  • [major] CCBC-151 Cancellation of the HTTP request might lead to memory leaks or to segfaults (2e3875c2).
  • [minor] Document LCB_SERVER_BUG and LCB_PLUGIN_VERSION_MISMATCH. Enhance the the lcb_strerror() test to detect undocumented error codes.
  • [critical] CCBC-153 Under high load the library could generate LCB_ETIMEDOUT errors without reason owing to internal limitations.

2.0.1 (2012-12-11)

50 files changed, 1009 insertions(+), 274 deletions(-)

  • libev-plugin: delay all timers while the loop isn't active. It will fix LCB_ETIMEOUT in the following scenario:
    • connect the instance
    • sleep for time greater than default timeout (e.g. 3 seconds)
    • schedule and execute a command (it will be timed out immediately)
  • libev-plugin: reset IO event on delete. We need to reset it, because it might be re-used later
  • CCBC-136: do not abort when purging SASL commands
  • Make library C89 friendly again
  • CCBC-132, CCBC-133: Ensure HTTP works even when the network may be unreliable. This changeset encompasses several issues which had been found with HTTP requests during network errors and configuration changes. Specifically some duplicate code paths were removed, and the process for delivering an HTTP response back to the user is more streamlined.
  • CCBC-130: Fix a memory leak on the use of http headers
  • CCBC-131: Compensate for cluster nodes lacking couchApiBase
  • Fix possible SEGFAULT. Not-periodic timers are destroyed after calling user's callback, after that library performed read from freed pointer.
  • SystemTap and DTrace integration

2.0.0 (2012-11-27)

12 files changed, 50 insertions(+), 12 deletions(-)

  • Install unlock callback in synchronous mode
  • Add the CAS to the delete callback
  • Minor update of the packaging layout:
    • libcouchbase-all package comes without version
    • extract debug symbols from libcouchbase-{bin,core} to libcouchbase-dbg package

2.0.0beta3 (2012-11-21)

64 files changed, 3641 insertions(+), 735 deletions(-)

  • CCBC-104 Fix illegal memory access. Reconnect config listener if the config connection was gone without proper shutdown.
  • Check for EWOULDBLOCK/EINTR on failed send
  • Allow to use gethrtime() from C++
  • Fix using freed memory (was introduced in 4397181)
  • Use dynamic versioning for plugins
  • Remove libtool version from the plugins
  • Allow to use 'cbc-hash' with files
  • CCBC-120 Purge stale OBSERVE packets
  • CCBC-120 Reformat and refactor lcb_server_purge_implicit_responses:
    • move packet allocation out of GET handler
    • dropping NOOP command shouldn't return error code
  • CCBC-122 Try to switch another server from backup list on timeout
  • CCBC-119: Allow the user to specify a different hash key. All of the data operations contains a hashkey and nhashkey field. This allows you to "group" items together in your cluster. A typical use case for this is if you're storing lets say data for a single user in multiple objects. If you want to ensure that either all or none of the objects are available if a server goes down, it could be a good idea to locate them on the same server. Do bear in mind that if you do try to decide where objects is located, you may end up with an uneven distribution of the number of items on each node. This will again result in some nodes being more busy than others etc. This is why some clients doesn't allow you to do this, so bear in mind that by doing so you might not be able to get your objects from other clients.
  • Create man pages for cbc and cbcrc
  • CCBC-118 lcb_error_t member in the http callbacks shouldn't reflect the HTTP response code. So the error code will be always LCB_SUCCESS if the library managed to receive the data successfully.
  • Timer in libev uses double for interval. Ref: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#code_ev_timer_code_relative_and_opti
  • CCBC-115 Return zero from do_read_data() if operations_per_call reached. The `operations percall' limit was introduced to prevent from freezing event loop. But in the function variable rv could store two different results and in case of reaching this limit it is returning number of the processed records, which is wrong. The function should return either zero (success) or non-zero (failure).
  • Do not allow admin operations without authentication
  • Fix cbc-bucket-create. `sasl-password' is misspelled, and it fails to parse the command line option.
  • CCBC-114 Lookup the plugin symbol also in the current executable image.
  • CCBC-113 Remove unauthorized asserion (d344037). The lcb_server_send_packets() function later check if the server object connected and establish connection if not (with raising possible errors)
  • Try all known plugins for LCB_IO_OPS_DEFAULT in run time
  • Don't use the time_t for win32. When compiling from php it turns out that it gets another size of the time_t type, causing the struct offsets to differ.
  • Add lcb_verify_compiler_setup(). This function allows the "user" of the library to verify that the compiler use a compatible struct packing scheme.
  • CCBC-87: Add documentation about the error codes

2.0.0beta2 (2012-10-12)

81 files changed, 2822 insertions(+), 1353 deletions(-)

  • Search ev.h also in ${includedir}/libev
  • Fix SEGFAULT if IO struct is allocated not by the lcb_create()
  • Allow libcouchbase to connect to an instance without specifying bucket. It is useful when the bucket not needed, e.g. when performing administration tasks.
  • Fix memory leak after an unsuccessful connection
  • Fix invalid memory access in cbc tool. Affected command is cbc-bucket-create
  • lcb_create: replace assert() with error code
  • CCBC-105 breakout event loop in default error_callback. This provides better default behaviour for users who haven't defined global error callback.
  • Allow users to build the library without dependencies. For example, without plugins at all. This may be useful if the plugin is implemented by or built into the host application.
  • Allow users to install both libraries (2.x and 1.x) on the same system.
  • Make the content type optional for lcb_make_http_request()
  • Fix password memory leak in http.c (7e71493)
  • Add support for raw http requests. libcouchase already contains all the bits to execute a raw http request, except for the possibility to specify a host:port, username and password.
  • Cleanup HTTP callbacks. Use the same callbacks both for Management and View commands, and rename them to lcb_http_complete_callback and lcb_http_data_callback.
  • Allow users to use environment variables to pick the event plugin
  • Add a new interface version for creating IO objects via plugins
  • Implement a new libev plugin. It is compatible with both libev3 and libev4.
  • CCBC-103: Fix linked event/timer lists for win32
  • Allow to disable CXX targets
  • lcb_connect() should honor the syncmode setting. Automatically call lcb_wait() when in synchronous mode

2.0.0beta (2012-09-13)

123 files changed, 13753 insertions(+), 8264 deletions(-)

  • Refactor the API. This is a full redesign of the current libcouchbase API that'll allow us to extend parts of the API without breaking binary compatibility. Also it renames all functions to have lcb_ prefix instead of libcouchbase_ and LCB/ LIBCOUCHBASE in macros.
  • Added --enable-fat-binary. Helps to solve issues when linking with fat binaries on MacOS.
  • Implement getter for number of nodes in the cluster: lcb_get_num_nodes()
  • Implement RESTful flush in the cbc toolset
  • Bundle Windows packages as zip archives
  • CCBC-98 Differentiate between TMPFAILs. This allows a developer to know if the temporary condition where the request cannot be handled is due to a constraint on the client or the server.
  • Don't try to put the current node last in the backup list. This may cause "duplicates" in the list if the REST server returns another name for the server than you used. Ex: you specify "localhost" and the REST response contains 127.0.0.1
  • Fix locking keys in multi-get mode
  • Fix bug where HTTP method is not set
  • CCBC-96 Correct buffer length for POST/PUT headers
  • Add lcb_get_server_list
  • Merge lcb_get_locked into lcb_get function
  • Fix Windows build
  • Include sys/uio.h. Needed by OpenBSD
  • Fix mingw build (c394a1c)
  • CCBC-80: Default to IPv4 only
  • Sync memcached/protocol_binary.h. Pull extra protocol_binary_datatypes declarations.
  • Deliver HTTP headers via callbacks
  • Unify HTTP interface. This means massive rename of the symbols
  • CCBC-92 release ringbuffer in lcb_purge_single_server
  • CCBC-91 Fix switching to backup node in case of server outage
  • CCBC-91 Reset timer for commands with NOT_MY_VBUCKET response
  • Fix alignment for sparc platforms
  • Fix win32 build (Add strings.h)
  • Fix build with libyajl available
  • Bundle libvbucket
  • Fix a problem with allocating too few slots in the backup_nodes. Fixes illegal memory access.
  • CCBC-90 Fix initialization of backup nodes array. The code switching nodes relies on NULL terminator rather than nbackup_nodes variable. Fixes illegal memory access.
  • CCBC-89: Release the memory allocated by the http parser

1.0.6 (2012-08-30)

5 files changed, 18 insertions(+), 5 deletions(-)

  • CCBC-92 release ringbuffer in libcouchbase_purge_single_server

1.0.5 (2012-08-15)

6 files changed, 23 insertions(+), 15 deletions(-)

  • CCBC-91 Fix switching to backup node in case of server outage
  • CCBC-91 Reset timer for commands with NOT_MY_VBUCKET response

1.1.0dp9 (2012-07-27)

5 files changed, 18 insertions(+), 11 deletions(-)

  • Render auth credentials for View requests. libcouchbase_make_http_request() won't accept credentials anymore. It will pick them bucket configuration.

1.1.0dp8 (2012-07-27)

36 files changed, 2093 insertions(+), 704 deletions(-)

  • Allow the client to specify the verbosity level on the servers using lcb_set_verbosity() function.
  • Bind timeouts to server sockets instead of commands. This means that from this point timeout interval will be started from the latest IO activity on the socket. This is a behavior change from the 1.0 series.
  • Allow the user to get the number of replicas using libcouchbase_get_num_replicas()
  • Allow a user to breakout from the event loop in callbacks using libcouchbase_breakout()
  • Make libcouchbase_wait() re-entrable
  • Let users detect if the event loop running already using libcouchbase_is_waiting() function.
  • CCBC-77 Use separate error code for ENOMEM on the client
  • CCBC-82 Implement read replica
  • CCBC-85 Implement general purpose timers. It is possible for users to define their own timers using libcouchbase_timer_create() function. (See headers for more info)
  • Implement multiple timers for windows
  • CCBC-15 Add OBSERVE command
  • Allow users to specify content type for HTTP request
  • Fix to handle the case when View base doesn't have URI schema
  • Separate HTTP callbacks for couch and management requests
  • Claim that server has data in buffers if there are HTTP requests pending. Without this patch the event loop can be stopped prematurely.
  • Add new cbc commands and options:
    • cbc-view (remove couchview example)
    • cbc-verbosity
    • cbc-admin
    • cbc-bucket-delete
    • cbc-bucket-create
    • Add -p and -r options to cbc-cp to control persistence (uses OBSERVE internally)

1.1.0dp7 (2012-06-19)

18 files changed, 266 insertions(+), 115 deletions(-)

  • Add support for notification callbacks for configuration changes. Now it is possible to install a hook using function libcouchbase_set_configuration_callback(), and be notified about all configuration changes.
  • Implement function to execution management requests. Using libcouchbase_make_management_request() function you can configure the cluster, add/remove buckets, rebalance etc. It behaves like libcouchbase_make_couch_request() but works with another endpoint.
  • Extract HTTP client. Backward incompatible change in Couchbase View subsystem

1.1.0dp6 (2012-06-13)

20 files changed, 201 insertions(+), 127 deletions(-)

  • CCBC-70 Close dynamic libraries. Fixes small memory leak
  • CCBC-72 Fix compilation on macosx with gtest from homebrew
  • CCBC-71 Implement 'help' command for cbc tool
  • Undefine NDEBUG to avoid asserts to be optimized out
  • Fix win32 builds:
    • Add suffix to cbc command implementations
    • Fix guards for socket errno macros
    • Define size_t types to fix MSVC 9 build
    • MSVC 9 isn't C99, but has stddef.h, so just include it
  • CCBC-63 Include types definitions for POSIX systems. Fixes C++ builds on some systems.

1.1.0dp5 (2012-06-06)

7 files changed, 65 insertions(+), 9 deletions(-)

  • The library doesn't depend on pthreads (eliminates package lint warnings)
  • Implement 'cbc-hash' to match server/vbucket for given key

1.1.0dp4 (2012-06-05)

8 files changed, 54 insertions(+), 7 deletions(-)

  • cbc: strtoull doesn't exist on win32, therefore use C++ equivalent.
  • integration with Travis-CI

1.1.0dp3 (2012-06-03)

54 files changed, 1874 insertions(+), 824 deletions(-)

  • CCBC-68 Implement UNLOCK_KEY ( UNL) command
  • CCBC-68 Implement GET_LOCKED ( GETL) command
  • hashset.c: iterate over whole set on rehashing. Fixes memory leaks related to hash collisions (905ef95)
  • Destroy view requests items when server get destroyed
  • Do not call View callbacks for cancelled requests
  • Fix ringbuffer_memcpy() (36afdb2)
  • CCBC-62 A hang could occur in libcouchbase_wait() after the timeout period. Check for breakout condition after purging servers
  • CCBC-65 A small memory leak can occur with frequent calls to libcouchbase_create() and libcouchbase_destroy()
  • CCBC-64. Timeouts can occur during topology changes, rather than be correctly retried. Send the retry-packet to new server
  • vbucket_found_incorrect_master() returns server index
  • Fix ringbuffer_is_continous()
  • Pick up cookies from pending buffer unless node connected
  • RCBC-33 A fix for a buffer overflow with the supplied password as has been integrated. While it is a buffer overflow issue, this is not considered to be a possible security issue because the password to the bucket is not commonly supplied by an untrusted source

1.0.4 (2012-06-01)

15 files changed, 330 insertions(+), 76 deletions(-)

  • CCBC-65 A small memory leak can occur with frequent calls to libcouchbase_create() and libcouchbase_destroy()
  • CCBC-62 A hang could occur in libcouchbase_wait() after the timeout period. Check for breakout condition after purging servers
  • CCBC-64. Timeouts can occur during topology changes, rather than be correctly retried. Send the retry-packet to new server
  • [backport] vbucket_found_incorrect_master() returns server index. (orig: c32fdae)

1.0.3 (2012-05-02)

6 files changed, 44 insertions(+), 7 deletions(-)

  • [backport] Fix ringbuffer_is_continous() (orig: 9cfda9d)
  • [backport] Pick up cookies from pending buffer unless node connected (orig: 463958d)
  • RCBC-33 A fix for a buffer overflow with the supplied password as has been integrated. While it is a buffer overflow issue, this is not considered to be a possible security issue because the password to the bucket is not commonly supplied by an untrusted source

1.1.0dp2 (2012-04-10)

10 files changed, 54 insertions(+), 20 deletions(-)

  • CCBC-59 Don't wait for empty buffers. If called with no operations queued, libcouchbase_wait() will block forever. This means that a single threaded application that calls libcouchbase_wait() at different times to make sure operations are sent to the server runs the risk of stalling indefinitely. This is a very likely scenario.
  • Don't define size_t and ssize_t for VS2008
  • Fix segfault while authorizing on protected buckets (211bb04)

1.1.0dp (2012-04-05)

59 files changed, 4374 insertions(+), 1205 deletions(-)

  • This release adds new functionality to directly access Couchbase Server views using the libcouchbase_make_couch_request() function. See the associated documentation and header files for more details
  • Check for newer libvbucket
  • MB-4834: Request the tap bytes in a known byte order (adf2b30)

1.0.2 (2012-03-06)

83 files changed, 4095 insertions(+), 654 deletions(-)

  • Implement VERSION command from binary protocol
  • Allow use of libcouchbase to pure memcached clusters by using libcouchbase_create_compat() function
  • Always sign deb packages and allow to pass PGP key
  • Bundle the protocol definitions for memcached ( memcached/protocol_binary.h and memcached/vbucket.h) to make it easier to build
  • Bundle sasl client implementation
  • Fix windows build for MS Visual Studio 9
    • define E* if missing
    • stdint header
  • Add support for multiple hosts for the bootstrap URL. A list of hosts:port separated by ';' to the administration port of the couchbase cluster. (ex: "host1;host2:9000;host3" would try to connect to host1 on port 8091, if that fails it'll connect to host2 on port 9000 etc)
  • Raise error if <stdint.h> missing
  • Add JSON support for cbc-cp command
  • Add option to set timeout for cbc
  • Added support for '-' to cp
  • Added cbc-verify: verify content in cache with files
  • Now cbc supports better usage messages

1.0.1 (2012-02-13)

65 files changed, 3275 insertions(+), 1329 deletions(-)

  • CCBC-38 Use alternate nodes when current is dead. A fix to allow the client library to failover automatically to other nodes when the initial bootstrap node becomes unavailable has been added. All users are recommended to upgrade for this fix.
  • Fix connect timeouts. Timeouts are per-operation and only set if there is any I/O. The special exception to this is initial connections, which do not necessarily have a data stream or write buffer associated wiht them yet.
  • Update to new MT-safe libvbucket API
  • Add option for embedding libevent IO plugin
  • Fix multi-{get,touch} requests handling when nkeys > 1
  • Allow to build without tools which require C++ compiler
  • Destroy event base if we created it
  • CCBC-51 Check server index before using
  • Handle PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET and retry it until success or another error, which can be handled by caller
  • Do not attempt SASL when SASL already in progress
  • Finer grained error reporting for basic REST errors:
    • return LIBCOUCHBASE_AUTH_ERROR on HTTP 401
    • return LIBCOUCHBASE_BUCKET_ENOENT on HTTP 404
    • event loop is stopped (via maybe_breakout) on REST error
  • Fixed segfaults and memory access errors on libevent1.4
  • Allow for notification on initial vbucket config. This makes libcouchbase stop_event_loop and libcouchbase maybe breakout work properly in cooperative asynchronous event loops. the wait flag is set by libcouchbase_wait() and unset by maybe_breakout. Additionally, breakout_vbucket_state_listener will call maybe_breakout as well, instead of having synchronous behavior assumed by libcouchbase_wait()
  • Fix sasl_list_mech_response_handler(). sasl_client_start() expects null-terminated string
  • Refactor: use libcouchbase_xxxx for the datatypes
  • Do not notify user about the same error twice. Use command callback when it's possible. (e.g. where the libcouchbase_server_t is accessible and we can libcouchbase_failout_server())
  • Install configuration.h for win32
  • CCBC-20 Implement operation timeouts. Timeouts applies for all operations, and the timer starts running from the moment you call the libcouchbase operation you want. The timer includes times for connect/send/ receive, and all of the time our application spend before letting the event loop call callbacks into libcouchbase.
  • Fix double free() error when reading key from packet in handler.c (b5d485a)

1.0.0 (2012-01-22)

170 files changed, 6048 insertions(+), 7553 deletions(-)

  • Allow the user to specify sync mode on an instance
  • Empty string as bucket name should be treated as NULL
  • Bail out if you can't find memcached/vbucket.h and libvbucket/vbucket.h
  • New command cbc. This command intended as the analog of mem* tools from libmemcached distribution. Supported commands:
    • cbc-cat
    • cbc-cp
    • cbc-create
    • cbc-flush
    • cbc-rm
    • cbc-stats
    • cbc-send
    • cbc-receive
  • CCBC-37 allow config for cbc tool to be read from .cbcrc
  • Convert flags to network byte order
  • Remove <memcached/vbucket.h> dependency
  • Use the error handler instead of printing to stderr
  • Disable Views code
  • Don't accept NULL as a valid "callback"
  • Add make targets to build RPM and DEB packages
  • Allow download memcached headers from remote host
  • Added docbook-based manual pages
  • Gracefully update vbucket configuration. This means that the connection listener, could reconfigure data sockets on the fly
  • Allow libcouchbase build with libevent 1.x (verified for 1.4.14)
  • Aggregate flush responses
  • Add stats command

0.3.0 (2011-11-02)

102 files changed, 6188 insertions(+), 1531 deletions(-)

  • Add flush command from binary protocol
  • Remove packet filter
  • Use ringbuffers instead buffer_t
  • Win32 build fixes
  • Allow to specify IO framework but using IO plugins
  • CCBC-11 The interface to access views
  • Initial man pages
  • Extend the test suite

0.2.0 (2011-09-01)

85 files changed, 12144 insertions(+)

  • Simple bootstapping which builds HTTP packet and listens /pools/default/buckets/BUCKETNAME directly. Allowed usage of defaults (bucket name, password)
  • Support basic set of binary protocol commands:
    • get (get and touch)
    • set
    • increment/decrement
    • remove
    • touch
  • MB-3294 Added _by_key functions
  • CCBC-5 Fixed abort in do_read_data (c=0x7b09bf0) at src/event.c:105
  • Added timings API. It might be possible to turn on timing collection using libcouchbase_enable_timings()/ libcouchbase_disable_timings(), and receive the data in timings callback.
  • Basic TAP protocol implementation
  • Initial win32 support