Skip to content

Releases: couchbase/couchbase-cxx-client

1.0.0-dp.7

25 Jul 19:26
1.0.0-dp.7
ba0bc82
Compare
Choose a tag to compare
1.0.0-dp.7 Pre-release
Pre-release

1.0.0-dp.7

API documentation: https://docs.couchbase.com/sdk-api/couchbase-cxx-client-1.0.0-dp.7

  • CXXCBC-242: SDK Support for Native KV Range Scans (#419, #423, #424, #428, #431, #432, #433, #434, #426)

    • Added prefix_scan as top-level scan type
    • Changed scan terms from byte vectors to strings
    • Seed for sampling scan is randomly generated if not specified
    • Removed range_scan_cancelled error code, returning request_canceled instead
    • Removed sorting
    • Added concurrency option to orchestrator to set the maximum allowed level of concurrency
    • The constructor of range_scan_orchestrator takes the vbucket map instead of the number of vbuckets
    • Implemented new concurrency approach for scanning vbuckets:
      • Streams start with the maximum level of concurrency. If a temporary failure occurs (i.e. receiving busy status from the server) the stream is retried a later point and the concurrency is reduced by 1
      • When a stream finishes successfully or with a benign error, another stream is initiated to take its place. If the temporary failure occurs, a new stream is not initiated which effectively reduces the concurrency (unless streams are not being executed concurrently in which case that continues)
      • The number of streams being run per node are kept track of and when a new stream should start, a vbucket on the least busy node is selected (initially random node is selected)
    • Added key_value_scan_timeout to timeout defaults (7.5 seconds)
    • Removed batch_time_limit from options, 90% of the timeout is used instead
    • Timeouts are now on both range_scan_create and range_scan_continue. There's also a check before retrying a stream if the time since the first attempt exceeds the timeout
    • The next methods of the scan result can return an error code in the case of a fatal error
    • Added cancel() method to scan_result that can cancel all streams
    • Errors on range scan continue or start are now separated into 'fatal' (which takes into account whether the scan is a sampling scan), 'retryable' or 'benign'
  • CXXCBC-349: Allow to pass trust certificate by value. (#430) See couchbase::cluster_options().security().trust_certificate_value() chain of methods.

  • CXXCBC-340: Support query with read from replica (#429)

    • Added use_replica option for query in both core and public APIs as an optional boolean. If set, it is included in the query request body.
    • Added n1ql_read_from_replica cluster capability which is checked when use_replica is set and a feature_not_available error code is returned if the capability is not present.
  • CXXCBC-339: Disable older TLS protocols. (#418) The change affects TLS v1.0 and v1.1 which are now disabled by default.

  • CXXCBC-343: Continue bootsrap if DNS-SRV resolution fails. (#422)

  • CXXCBC-337: Bucket management public API. (#421)

  • CXXCBC-335: Log connection options. (#417)

  • CXXCBC-346: Allow to log network communication. (#425) In order to use this feature, the application must create special logger. This process does not require any parameters except the file name, where the network communication will be recorded.

    couchbase::core::logger::configuration configuration{};
    configuration.filename = "/tmp/couchbase-sdk.log";
    couchbase::core::logger::create_protocol_logger(configuration);
    
  • CXXCBC-333: Fix parsing 'resolv.conf' on Linux. (#416) The library might not ignore trailing characters when reading nameserver address from the file.

  • CXXCBC-329: Allow to select network using cluster options. (#413) See couchbase::cluster_options().behavior().network() chain of methods.

1.0.0-dp.6

23 May 16:18
1.0.0-dp.6
adc416d
Compare
Choose a tag to compare
1.0.0-dp.6 Pre-release
Pre-release

API documentation: https://docs.couchbase.com/sdk-api/couchbase-cxx-client-1.0.0-dp.6

  • CXXCBC-328: Fix socket reconnection during rebalance process (#406). There are several improvements has been implemented to make the library resilient to rapid topology changes (in particular in Cloud environment) when both DNS-SRV bootstrap is being used along with alternative addresses. The changes include:

    • take into account alternative hostname and ports during detection of added/removed nodes on configuration update
    • replace node index tracking with hostname/port matching to when restarting the connections, this way we will be sure that no duplicate connections will be left, or live connections replaced by restarted session.
    • improved logging of critial events during rebalance: restarting, preservation and removing connections.
  • CXXCBC-326: Set warnings field of connection_string when invalid connection string parameter is encountered (#411). It could be used by the wrappers to hint users about the issues in the connection string. The library treats various checks for the values of the options, while parsing issues will be classified as errors.

Tools

  • Added --verbose switch to cbc-get and cbc-pillowfight that will report error contexts of every failed operation to standard error stream in JSON format. It might be useful to collect/diagnose errors of the long running workloads.

  • Added batching switches --batch-size and --batch-wait to cbc-pillowfight. --batch-size allows to change number of operations to be scheduled at once before waiting for completion. --batch-wait allows to insert delays between batches in the workload thread.

  • Added --number-of-keys-to-populate switch, which allows to preload set of keys before running the workload. The switch sets number of the keys per thread.

1.0.0-dp.5

17 May 14:01
1.0.0-dp.5
2c6a065
Compare
Choose a tag to compare
1.0.0-dp.5 Pre-release
Pre-release

API documentation: https://docs.couchbase.com/sdk-api/couchbase-cxx-client-1.0.0-dp.5

  • CXXCBC-327: Bundle Mozilla certificates with the library. (#405)
    See mozilla_ca_bundle_date and mozilla_ca_bundle_sha256 in build info report to find out the version of the Mozilla certificates embedded. Source: https://curl.se/docs/caextract.html. Use disable_mozilla_ca_certificates option to disable bundled certificates.

  • CXXCBC-240: Public API for analytics queries. (#392)

  • CXXCBC-239: Public API for full text search. (#397)

  • CXXCBC-144: Search query on collections should not require you to pass in the scope name. (#379)

  • CXXCBC-145: Use raw option in search query request. (#380)

  • CXXCBC-323: Parse bootstrap_timeout and resolve_timeout in connection string. (#400)

  • Introduce option dump_configuration for debugging. (#398)
    When it is true, the library will log configuration content on TRACE level for each update.

  • CXXCBC-324: Check port and network name on session restart. (#401)

  • CXXCBC-31: Allow to use schema-less connection strings. (#394)

  • CXXCBC-318: always try TCP if UDP fails in DNS-SRV resolver. (#390)
    Also don't wait for UDP response until deadline, leave some time for TCP attempt.

Transactions

  • CXXCBC-320: Negative expiry in ATR can 'stick' docs. (#393)
    The effect is that the expiry seems to be a very large positive number. Now the library just read it as an int32_t, cap it at 0 on the low side. Turns out we definitely cap at 0 when we write, so this probably has to be from some old version that had flawed logic when writing.

  • CXXCBC-310: Transaction FIT test errors (#378)
    When we stage an insert, and get an ambiguous fail back, we look for the doc and examine it to see if we can retry, etc... When doing so, if the doc was staged successfully, we just need to make sure the that we use the staged_mutation's content, not the content in the staged_mutation's doc, as that will have the results of looking at the document after we staged it as a tombstone, so the content will be empty. This showed up in some ambiguous fail tests in FIT.

  • CXXCBC-194: Support ExtThreadSafe transaction extension. (#374, #376)
    Updated the public version of transaction_get_result to not strip out the metadata and links, as they are needed when staging replace/remove operations.
    Also, the FIT tests would sometimes run into issues with the naive retry strategy when there was a FAIL_AMBIGUOUS while setting the ATR. Reimplemented the transaction_context's utility for delaying to no longer be recursive, avoiding the issue.

  • CXXCBC-316: Core transactions get_optional after query issue. (#385)
    When we have removed a doc in active transaction, and then call get_optional, we expect to just get an empty optional. However, the handler was raising a transaction_operation_failed. To fix that get_doc call returns no error, and no document. When that happens and we are in a get_optional, we should just return the empty optional.

  • CXXCBC-310: Fix race condition in the transaction_context reported by TSAN when running FIT tests. (#386)

  • Fix typo in attempt_context::insert (#391)

  • CXXCBC-310: LostTxnCleanup wasn't stopping right away (#389)
    When shutting down, for instance, the lost attempt loop would not stop sometimes, leading to issues with tests sometimes. Now, it is only accessing the running_ bool under the lock, so it is safe to use it in the wait calls as well.
    Also, it was creating a client record doc if it was missing, when deleting, which is not necessary.

Tools

  • Move tool_kv_loader to cbc-pillowfight. (#384)

Build, Test and Documentation Improvements

  • Fix macro symbols for build info (#403)

  • Improve build time (#399)

    • Reduce number of inclusions for core/cluster_options.hxx. It speeds up build on windows a little bit.
    • Update catch2. It allows to move from header-only Catch to object file, which also saves some build time
  • SDKQE-2596: Search query testing. (#381)

  • Update snappy from 1.1.8 to 1.1.10 (#387)
    It brings perfromance improvements. More info at: google/snappy@1.1.8...1.1.10

  • Allow to run tests with gocaves (#404)

  • Add link to API reference and release notes to README. (#410)

  • init-cluster script: improve waiting loop for the cluster port. (#383)

  • CXXCBC-227: Transaction public API docs. (#396)

  • Update doxygen API docs (#373, #377, #407)

    • fixed links
    • inlined transactions example
    • included list of all other examples
    • show start using example on main page (compilation and execution checked in the test suite).
    • declare default options for KV and Query APIs.
    • configure Doxygen to recurse into headers, not just consume toplevel headers.
    • smaller tweaks and fixes
  • Group CLI and API pages (#375)

  • Disable some tests for Elixir integration, that are not yet supported by the platform. (#409)

  • CXXCBC-315: improve OpenSSL detection on CentOS 7 (#382)

    • display version after successful build
    • fix cbc invocation on windows and homebrew on macos
    • extra info about openssl in use
  • Increase timeouts for Capella test environment on CI. (#388)

1.0.0-dp.4

21 Feb 14:51
1.0.0-dp.4
ec53d75
Compare
Choose a tag to compare
1.0.0-dp.4 Pre-release
Pre-release

API documentation: https://docs.couchbase.com/sdk-api/couchbase-cxx-client-1.0.0-dp.4

  • CXXCBC-275: Update implementation query context fields passed to the server. In future versions of the server versions it will become mandatory to specify context of the statement (bucket, scope and collection). This change ensures that both future and current server releases supported transparently.

  • CXXCBC-296: Force PLAIN SASL auth if TLS enabled. Using SCRAM SASL mechanisms over TLS protocol is unnecesary complication, that slows down initial connection bootstrap and potentially limits server ability to improve security and evolve credentials management.

  • CXXCBC-295: The get with projections opration should not fail if one of the the paths is missing in the document, because the semantics is "get the partial document" and not "get individual fields" like in lookup_in operation.

  • CXXCBC-294: In the Public API, if get operation requested to return expiry time, zero expiry should not be interpreted as absolute expiry timestamp (zero seconds from UNIX epoch), but rather as absense of the expiry.

  • CXXCBC-291: Allow to disable mutation tokens for Key/Value mutations (use enable_mutation_tokens in connection string or cluster options).

  • CXXCBC-188: Implement ChangePassword in user management API.

  • Resource management and performance improvements:

    • Fix tracer and meter ref-counting (#370)
    • Replace minstd_rand with mt19937_64, as it gives less collisions (#356)
    • CXXCBC-285: Write to sockets from IO threads, to eliminate potential race conditions. (#348)
    • Eliminate looping transform in mcbp_parser::next (#347)
    • CXXCBC-205: Use thread-local UUID generator (#340)
    • CXXCBC-293: Performance improvements:
      • Speed up UUID serialization to string (#346)
      • Don't allow to copy mcbp_message objects (#345)
      • Avoid extra allocation and initialization (#344)
  • Build system fixes:

    • Fix build with gcc-13 (#372)
    • Fix gcc 12 issue (#367)
    • Include branch name in CI badge links (#352)
    • Set build timeouts for github actions (#351)
  • CLI tools:

    • Added cbc tool, similar to what libcouchbase provides. At the moment three sub-commands available: version, get and query. (#366)
    • tool_kv_loader: allow to use generated value in loader tool (#343)
    • tool_kv_loader: allow to exit after certain number ops executed (#341)
  • Enhancements:

    • Allow to get list of available configuration profiles. Useful for validation and UX. (#362)
    • Add more fmt helpers: query_scan_consistency, query_status, and change cas representation into fixed length base-16 number. (#361)
    • Include bucketless KV service when ping is requested. (#339)
    • CXXCBC-290: add header with feature macros (#355)
    • Include OS name in SDK identifier (#349)
    • Expose more functions to get version info (#353)
    • Add function to generate semantic version from git-describe (#354)
    • CXXCBC-286: Decode value of user_agent_extra argument when it is URL-encoded and passed through connection string. (#350)
  • Transactions:

    • CXXCBC-289: Refactor transactions logging to match rest of C++ SDK.

1.0.0-dp.3

21 Feb 14:48
1.0.0-dp.3
e3be8b0
Compare
Choose a tag to compare
1.0.0-dp.3 Pre-release
Pre-release
  • CXXCBC-275: Update query_context handling in query management calls. Known issue: query management operations will fail with 1065: Unrecognized parameter in request: query_context error on server version 6.6.

  • Build system fixes:

    • Update badges (#330)
  • Enhancements:

    • CXXCBC-276: Use interval from the options for config poll, which previous was hard-coded to 2.5 seconds. (#336)
  • Transactions:

    • CXXCBC-259: Transactions public API expects bucket already open, so the library will automatically open buckets inside transaction logic. (#334)
    • CXXCBC-197: Add support for ExtInsertExisting. (#332)
    • TXNCXX-260: Fixed ExtBinaryMetadata bug. (#333)
    • CXXCBC-261: Query error handling issues. (#324)
  • Preview features:

1.0.0-dp.2

20 Feb 11:44
1.0.0-dp.2
65e328a
Compare
Choose a tag to compare
1.0.0-dp.2 Pre-release
Pre-release
  • CXXCBC-270: Rename logging macros, adding CB_ prefix (e.g. LOG_DEBUG -> CB_LOG_DEBUG) (#323)

  • CXXCBC-242: Drain waiting commands list on MCBP session close (#321)

  • CXXCBC-271: Fix get_all_replicas behaviour: do not propagate error if result set is not empty, while the last response has failed. (#322)

  • Build system fixes:

    • Issue with CMakeFile when including in other projects (#314)
    • Remove pipefail option from test shell script (#316)
    • Updates test scripts to include backtraces after failure (#315, #317, #319)
  • Transactions:

  • Preview features:

    • Key/Value range scan:

1.0.0-dp.1

01 Nov 00:58
1.0.0-dp.1
ace55e8
Compare
Choose a tag to compare
1.0.0-dp.1 Pre-release
Pre-release

First developer preview of the C++ Couchbase client. Other than additions, we expect to make as few (if any) changes to the current interface as we move towards a general release. Please check out the /examples directory for some example usage of the API, both the synchronous and asynchronous versions. Also, the tests in /test should provide more examples, as well.

The API documentation will be fleshed out more thoroughly in coming DP releases, as will the examples and tests.

Like any Developer Preview, this should not be used in production.

This docs/stability.hxx describes our API stability tags. We don't expect changes to the classes and methods that are marked with the @committed tag, although other interfaces might be changed or removed. Please open tickets at https://issues.couchbase.com/projects/CXXCBC if something is missing, or with general questions. We are also available in Discord and Forums (more details at CONTRIBUTING.md).

  • CXXCBC-142: Update SRV resolution for Windows (#303)
  • CXXCBC-172: Refresh DNS SRV when cluster uncontactable (#275, #290)
  • CXXCBC-234: Error message for bucket hibernation and update error message for authentication_failure. (#280, #285)
  • CXXCBC-235: Load system CAs when the trust certificate is not provided and do not fail if trust certificate is not specified (#283, #281)
  • CXXCBC-245: Fix encoding of durability frame (#277)
  • CXXCBC-246: Convert not_stored code to document_exists (#278)
  • CXXCBC-251: Fix snappy decompression for get_replica (#296)
  • CXXCBC-253: query_options not setting scope_qualifier (#300)
  • SDKQE-2761: Fix failures in serverless mode (#274)
  • Don't log expected warnings in DNS resolver (#294)

Public API:

Resource management and performance fixes:

  • CXXCBC-225: don't throw exceptions when socket options cannot be set (#270)

Build system fixes:

  • Move away from reinterpret_pointer_cast<> for MacOS build issue (#288)
  • Improve OpenSSL detection on Windows (#272)
  • CXXCBC-226: ensure that moving from movable_function will clear the source (#271)

Enhancements:

  • Update ASIO to get most recent channels (#299)
  • CXXCBC-235: update code comment about default root CA (#282)
  • CXXCBC-221: Update "wan_development" config profile (#269)
  • CXXCBC-249: allow to construct cluster object using public API (#291)

Transactions:

1.0.0-beta.3

20 Feb 13:14
1.0.0-beta.3
821645b
Compare
Choose a tag to compare
1.0.0-beta.3 Pre-release
Pre-release

Public API:

  • Split private/public API and update namespaces (#230)
  • Expose lookup_in as public API (#248)
  • Expose touch and get_and_touch in public API (#245)
  • Improve usability of mutate_in API (#244)
  • CXXCBC-53: expose get and mutation operations to public API (#240)
  • Move error codes to public API (#232)
  • CXXCBC-88: Set production as default namespace for view query (#209)
  • CXXCBC-52: Implement replica read operations (#221, #253, #234)
  • CXXCBC-151: Add support for raw to view request (#177)
  • CXXCBC-170: use hostname to detect Capella suffix (#198)
  • CXXCBC-152: Add on error option to view request (#178)

Bug fixes:

  • CXXCBC-134: Close http_session before conecting to next endpoint (#213)
  • CXXCBC-179: fix parsing responses with chunked meta trailer (#191)
  • CXXCBC-170: add extra check for missing CA for TLS connections (#197)
  • CXXCBC-182: add extra check for keywords in query index fields (#196)
  • CXXCBC-173: complete streaming lexer even if pointer didn't match (#195)
  • CXXCBC-212: reprepare and retry query on 4040, 4050 and 4070 (#257)
  • CXXCBC-174: reduce scope of the http request lock (#259)
  • CXXCBC-176: ignore 'is_primary' for named primary indexes when dropping (#202)
  • return subdocument error context from future-based subdoc methods (#258)

Enhancements:

  • CXXCBC-198: Implement build deferred indexes per RFC-54 (#238)
  • CXXCBC-220: query_index_build_deferred (#267)
  • CXXCBC-219: compound operation for build deferred indexes (#264)
  • Add missing includes to query_index_build_deferred (#266)
  • CXXCBC-53: implement legacy durability for mutation operations (#252, #241)
  • Fixed insert ops incorrectly encoding durability framing extras. (#217)
  • use movable_function for observe poller (#265)
  • [CXXCBC-217]: allow to get tao::json:(https://issues.couchbase.com/browse/CXXCBC-217):value from transcoder (#261)
  • CXXCBC-215: hide subdoc implementation details (#256)
  • CXXCBC-216: allow to use movable_function for replica callbacks (#260)
  • CXXCBC-156: use vector of bytes instead of string for binary data (#216)
  • CXXCBC-161, CXXCBC-94: update ping implementation (#211)
  • CXXCBC-93: Use an enum for analytics metadata status (#225)