Skip to content

Releases: couchbase/libcouchbase

2.9.4

29 Aug 14:26
2.9.4
Compare
Choose a tag to compare

API documentation: http://docs.couchbase.com/sdk-api/couchbase-c-client-2.9.4/

  • CCBC-970: Update list of retriable errors for analytics

  • CCBC-965: Update log level in config cache provider

  • CCBC-967: optimize Threshold Tracer queues/sorting

  • CCBC-963: remove global state from random generator, and make it thread-safe.

  • CCBC-966: return current network for LCB_CNTL_NETWORK

  • CCBC-969: Allow to skip version from git tags

  • CCBC-961: Add examples for FTS queries

  • CCBC-971: disable dead socket detection for older libuv (fixes build on platforms, where old libuv-dev package installed).

  • Report HELO features to logger in the single line.

  • Allow to select compression mode in connection string. This might be useful for debugging purposes. For example, to bypass inflation step when receiving data.

    $ CONNSTRING=couchbase://localhost/default?compression=deflate_only
    $ cbc cat -U $CONNSTRING 00000000.json > bindoc.dat
    00000000.json        CAS=0x15431f831dc60000, Flags=0x0, Size=739, Datatype=0x03(JSON,SNAPPY)
    

2.9.3

17 Jul 23:23
2.9.3
Compare
Choose a tag to compare

API documentation: http://docs.couchbase.com/sdk-api/couchbase-c-client-2.9.3/

  • CCBC-955: Parse uint32 as unsigned ints instead of timeouts. Some settings were interpreted as time values, while they should not (e.g. console_log_level, compression_min_size etc). This issue forced the library to misinterpret user input (converter was multiplying all values to 1000000, e.g. log level was always TRACE).

  • CCBC-957: Automatically disable SSL support, when OpenSSL is unavailable.

  • CCBC-954: Define EFTYPE error code if it does not exist. Fixes support of libuv 1.21 and higher.

  • CCBC-951: Remove experimental warning from subdoc API.

  • CCBC-948: Consider retry queue with only 0xb5 as empty. This allows a breakout from lcb_wait earlier (when application operates in synchronous style). The old behaviour, where lcb_wait does not breakout until the library gets the first successful configuration, still can be restored with lcb_cntl(..., LCB_CNTL_WAIT_FOR_CONFIG, ...).

  • CCBC-939: Optimize the performance of built-in tracer. It now uses sllist for tags container instead of Json::Value.

  • CCBC-958: Check tracing span tags argument more pedantically and return error if arguments are not valid.

  • CCBC-956: Combine operation id and name into single field in the threshold tracer.

  • CCBC-949: Do not hardcode libevent dependencies in DEB packages. Instead let dh_shlibdeps script to detect dependencies for each platform. This fixes useless dependency on libevent-1 for ubuntu 18.04.

  • CCBC-947: Fix build scripts for examples (when built with -DLCB_BUILD_EXAMPLES=ON).

And other small fixes and improvements.

2.9.2

22 Jun 13:40
2.9.2
Compare
Choose a tag to compare

2.9.1

22 Jun 11:47
2.9.1
Compare
Choose a tag to compare

API documentation: http://docs.couchbase.com/sdk-api/couchbase-c-client-2.9.1/

  • CCBC-942 Expose new error codes for subdocument operations.

  • CCBC-866 Check cached provider isn't NULL.

  • CCBC-890 Always check if SSL used when getting ports.

  • CCBC-945 Allow to specify logger in lcb_create().

  • CCBC-935 Display orphan tracer report on WARN log level.

  • CCBC-936 Update default tracing interval to 10 seconds.

  • CCBC-937 Implement support for alternate addresses.

  • CCBC-943 Implement option to dump TCP packets. This change introduces new cmake option, which will force library to report all incoming/outgoing TCP packets on TRACE log level. It renders the bytes in Base64 encoding. Also there is simple extraction tool, which beautifies packet traces, and could be used like this:

    cbc cat  -vvv foo bar 2>&1 | tools/extract-packets.rb
    

2.9.0

24 May 15:23
2.9.0
Compare
Choose a tag to compare

API documentation: http://docs.couchbase.com/sdk-api/couchbase-c-client-2.9.0/

This release is mostly about API visibility bump from uncommited to committed, but also includes several bug fixes.

  • CCBC-930: Dump threshold logging tracer queues before destroying the tracer.

  • Updates in crypto API as per RFC. This basically change of the API (ABI has preserved compatible, but v0 crypto API will return runtime error with 2.9.0 library. From this release, all encryption key management encapsulated into crypto provider, so it does not need to expose key loader interface. In addition, that user API is changed to conform RFC, and use noun fields instead of document (e.g. lcbcrypt_encrypt_fields).

  • CCBC-925: Fix existence checks for registered crypto providers.

  • CCBC-924: Initialize flag for JSON server feature. Otherwise it might be left uninitialized and the library will send JSON datatype to servers, which do not support it.

  • PCBC-543, CCBC-932, CCBC-933: Update log levels

2.8.7

02 May 15:05
2.8.7
Compare
Choose a tag to compare

API documentation: http://docs.couchbase.com/sdk-api/couchbase-c-client-2.8.7/

  • CCBC-917: Add tracing for observe. So now the library will group all CAS-observe operations, and in general will nest observe operations under common parent when lcb_storedur3 API used.

  • CCBC-918: Don't ping KV on nodes without DATA service.

  • CCBC-685: Implementation of SCRAM-SHA{1,256,512} authentication mechanisms for KV service. Support for SCRAM-SHA* SASL auth is disabled by default, because it is not portable, and not every Couchbase service supports it. But if it is necessary, it could be enabled using lcb_cntl(..., LCB_CNTL_FORCE_SASL_MECH, ...) operation, or "force_sasl_mech=SCRAM-SHA512" option in connection string.

  • CCBC-919: More granular settings for compression. Now it is possible to specify minimum size of the value to be considered for compression, and also the minimal ratio (compressed / original). See LCB_CNTL_COMPRESSION_MIN_SIZE (or "compression_min_size=100" in bytes), and LCB_CNTL_COMPRESSION_MIN_RATIO (or "compression=0.9").

  • CCBC-916: Do not set JSON datatype if server didn't ack it. Fixes behavior where old server rejecting commands as invalid when compression is enabled.

  • CCBC-923: Allow to disable fast-forward map for NMV handler. See LCB_CNTL_VB_NOREMAP ("vb_noremap=true"). This option is disabled by default.

Build improvements:

  • CCBC-915: Fix builds where DEBUG macro is defined

  • CBD-2405: Change target names in conflict with Server targets

2.8.6

05 Apr 16:56
2.8.6
Compare
Choose a tag to compare

API documentation: http://docs.couchbase.com/sdk-api/couchbase-c-client-2.8.6/

Changes

  • CCBC-888: Add threshold logging tracer, which tracks and reports above threshold and orphaned operations. This is beta functionality, which is disabled by default. To enable it, use enable_tracing=on in the connection string.

  • CCBC-910: Field encryption API. The lcbcrypto_* functions abstracts encrypted field layout from actual crypto implementations (OpenSSL, libsodium, etc.). The wrapper or application using libcouchbase is expected to connect their own crypto and key providers, while libcouchbase provides transformation of the encrypted data. See sample crypto provider in example/crypto.

  • CCBC-904: Remove trailing comma in lcb_KVBUFTYPE enum. Fixes build on some older compilers.

  • CCBC-907: cbc-n1qlback: Do not require trailing empty line for input.

  • CCBC-908: cbc-n1qlback: Report number of loaded queries.

  • Add ability to write OPS/SEC from cbc-pillowfight to a file

    cbc-pillowfight 2> /tmp/stats.txt
    

    or, when writing to terminal required

    cbc-pillowfight 2>&1 | tee /tmp/stats.txt
    
  • Build improvements for easier integration into with server manifest (and TLM project).

2.8.5

24 Feb 09:41
2.8.5
Compare
Choose a tag to compare

API documentation: http://docs.couchbase.com/sdk-api/couchbase-c-client-2.8.5/

Changes

  • CCBC-883: Always use built-in compression. It is not possible to unbundle the Snappy library, as libcouchbase uses the C++ API which is not exported in the headers. Also, compression can now work on all types of buffers, including LCB_KV_IOV and LCB_KV_IOVCOPY. This fixes compression in cbc-pillowfight tool.

  • CCBC-895: Fix typo in rendering IPv6 addresses in lcb_diag.

  • CCBC-879: Implement log redaction. When log_redaction=on is specified in the connection string, the library will wrap sensitive data in the logs in special tags, which can be processed by the cblogredaction tool from the server distribution.

  • CCBC-893: Updated list of subdoc error codes.

  • CCBC-892: Enable the SSL trust store to be in a separate file. Trust store has to be specified with option truststorepath=…, otherwise the library will expect it to be stored with the certificate in certpath=.

  • CCBC-888: Per operation tracing. When compiled with tracing support (cmake -DLCB_TRACING=ON), the library will expose the tracing API, which allows to measure time of every data operation, and include some extra information. The API is modeled after OpenTracing and allows one to write custom tracers to consume this information. For more information, see an example in example/tracing/tracing.c. This is uncommitted API at this time.

    Also this feature includes support for new type of the server responses, which include time spent to execute the KV command on the server. This feature controlled by enable_tracing option in connection string or lcb_cntl(..., LCB_CNTL_ENABLE_TRACING, ...).

  • Added basic support of JSON datatype. The library will negotiate a mode, in which the application will see LCB_VALUE_F_JSON flag on datatype field of the response in the operation callback, if the cluster detected the content of the document to be valid JSON. Also the application can send this flag on the outgoing documents to notify the server about payload format.

  • Refresh dtrace/systemtap integration. Also adds tapset for SystemTap to simplify access to trace points.

  • cbc-pillowfight improvements and changes:

    • dump diagnostics on SIGQUIT (CTRL-\ in terminal).
    • with -J/--json, the JSON datatype will be sent on the documents.
    • enable randomized document bodies with -R/--random-body switch.
    • durability checks for pillowfight with --persist-to/--replicate-to.
    • pessimistic locking of keys before updating with --lock.
    • when requesting timings with -T/--timings, the application will no longer dump them periodically.Instead it will await for the user to signal SIGQUIT and also dump them on exit. The old mode of reporting regularly is enabled by repeating the switch more than once (e.g. -TT).
  • Added the cbc-watch command to monitor server stats. By default it tracks cmd_total_ops, cmd_total_gets and cmd_total_sets updating stats once a second, and displaying diff with the previous value.

2.8.4

20 Dec 08:36
2.8.4
Compare
Choose a tag to compare

API documentation: http://docs.couchbase.com/sdk-api/couchbase-c-client-2.8.4/

Changes

  • CCBC-880: Implement x.509 client certificate authentication. Connection string must use TLS-enabled scheme (couchbases:// or https://) and set options certpath and keypath. For example,

      couchbases://127.0.0.1?certpath=/path/to/chain.pem&keypath=/path/to/client.key
    

    Read more at server docs: https://developer.couchbase.com/documentation/server/5.0/security/security-x509certsintro.html

  • CCBC-883: Revisit builtin compression implementation (snappy). Add compression to cbc tools (see --compress, -y options). Future versions of Couchbase Server will have end-to-end compression.

  • CCBC-885: Do not skip HTTP Basic authentication when password is empty.

  • CCBC-876: Make sure that server authority is always specified. In some cases, when libcouchbase generates vbucket configuration or data service is not available, the authority of the server might be NULL. This could cause issues, as we compare servers from configs using their authority fields.

  • CCBC-878: Support collections in cbc-pillowfight.

    Note that this change does not expose anything related to Collections API for libcouchbase. It defines hidden switches for pillowfight tool to allow benchmark of collections. The switches are not documented and might be removed in the future. Use with care.

    Generate only beer:<seqno> keys:

      cbc pillowfight --separator : --collection beer
    

    Using many --collection will alternate in generating beer:<seqno>, brewery:<seqno> keys (default separator is ":"):

      cbc pillowfight --collection beer --collection brewery
    
  • CCBC-801: Expose information about network IO for monitoring. The diagnostics exposed as string with encoded JSON object.

      void diag_callback(lcb_t instance, int cbtype, const lcb_RESPBASE *rb)
      {
          const lcb_RESPDIAG *resp = (const lcb_RESPDIAG *)rb;
          if (resp->rc != LCB_SUCCESS) {
              fprintf(stderr, "failed: %s\n", lcb_strerror(NULL, resp->rc));
          } else {
              if (resp->njson) {
                  fprintf(stderr, "\n%.*s", (int)resp->njson, resp->json);
              }
          }
      }
    
      lcb_install_callback3(instance, LCB_CALLBACK_DIAG, diag_callback);
      lcb_CMDDIAG cmd = { 0 };
      lcb_diag(instance, NULL, &cmd);
      lcb_wait(instance);
    
  • CCBC-874: Dynamic authenticator. Note that this feature should not be considered at public interface. To use it, application have to define two callbacks, which will return username and password dependending on bucket name and hostname/port of the endpoint.

      std::map< std::string, std::string > credentials = {
          {"protected", "secret"}
      };
      extern "C" {
        static const char *get_username(void *cookie,
                                        const char *host,
                                        const char *port,
                                        const char *bucket)
        {
            return bucket;
        }
    
        static const char *get_password(void *cookie,
                                        const char *host,
                                        const char *port,
                                        const char *bucket)
        {
            std::map< std::string, std::string > *credentials =
                static_cast<std::map< std::string, std::string > *>(cookie);
            return (*credentials)[bucket].c_str();
        }
      }
    

    and later pass these callbacks to authenticator like this:

      lcb_AUTHENTICATOR *auth = lcbauth_new();
      lcbauth_set_callbacks(auth, &credentials, get_username, get_password);
      lcbauth_set_mode(auth, LCBAUTH_MODE_DYNAMIC);
      lcb_set_auth(instance, auth);
    
  • Include platform/compiler into client id, which included into HELLO and HTTP requests.

  • Fix parallel build on Linux when dtrace enabled

  • cbc-proxy: proxy N1QL, FTS and Analytics queries using STAT command.

2.8.3

22 Nov 10:21
2.8.3
Compare
Choose a tag to compare

API documentation: http://docs.couchbase.com/sdk-api/couchbase-c-client-2.8.3/

Changes

  • CCBC-415: Fixes in IPv6 support. To use IPv6 addresses, the application should connect to IPv6-enabled Couchbase Server, and explicitly switch on option via connection string ipv6=allow or ipv6=only, where first variant permits the library to use both IPv6 and IPv4, and the second -- disables IPv6. Alternatively this setting controlled with LCB_CNTL_IP6POLICY and lcb_cntl.

  • CCBC-872: Metrics management. These metrics are intended at providing information on libcouchbase operations performed over the lifetime of the current lcb_t instance (processed request packets, processed response packets, request packets pending emission, server errors, server timeouts, misrouted operations, retried operations).

    Metrics collection is currently disabled by default. To enable metrics collection, the user should call:

    int activate = 1;
    lcb_cntl(instance, LCB_CNTL_SET, LCB_CNTL_METRICS, &activate);
    

    Access to the collected metrics is done using:

    lcb_METRICS* my_metrics;
    lcb_cntl(instance, LCB_CNTL_GET, LCB_CNTL_METRICS, &my_metrics);
    
  • CCBC-870: Fix updating URL on retry. When retrying HTTP request, instead of replacing just host:port part of the old URL, the library inserted full URL.

  • CCBC-547: Detect dead sockets under libuv.

  • Ensure macros safe by surrounding values with parentheses