Skip to content

Releases: mongodb/mongo-cxx-driver

MongoDB C++11 Driver r4.0.0

20 Nov 21:06
7402d3d
Compare
Choose a tag to compare

Added

  • Getter for the start_at_operation_time option in mongocxx::v_noabi::options::change_stream.

Changed

  • Bump the minimum required C Driver version to 1.29.0.
  • CMake option ENABLE_TESTS is now OFF by default.
    • Set ENABLE_TESTS=ON to re-enable building test targets.
    • Set BUILD_TESTING=ON to include test targets in the "all" target when ENABLE_TESTS=ON (since 3.9.0, OFF by default).
  • Layout of mongocxx::v_noabi::options::change_stream to support the new optional start_at_operation_time accessor.

Deprecated

Removed

  • Support for external polyfill libraries.
    • ENABLE_BSONCXX_POLY_USE_IMPLS=ON is now implicit behavior.
    • The following CMake options are no longer supported:
      • ENABLE_BSONCXX_POLY_USE_IMPLS
      • BSONCXX_POLY_USE_MNMLSTC
      • BSONCXX_POLY_USE_MNMLSTC_SYSTEM
      • BSONCXX_POLY_USE_BOOST
  • Support for CMake option MONGOCXX_OVERRIDE_DEFAULT_INSTALL_PREFIX.
    • MONGOCXX_OVERRIDE_DEFAULT_INSTALL_PREFIX=OFF is now implicit behavior.
  • Redeclarations of bsoncxx::stdx interfaces in the mongocxx::stdx namespace.
    • Use bsoncxx::stdx::optional<T> instead of mongocxx::stdx::optional<T>.
    • Use bsoncxx::stdx::string_view instead of mongocxx::stdx::string_view.
  • Inline namespace macros for bsoncxx and mongocxx namespace: *_INLINE_NAMESPACE_*.
  • The <bsoncxx/stdx/make_unique.hpp> header.
  • The <bsoncxx/types/value.hpp> header.
  • The <bsoncxx/util/functor.hpp> header.
  • The <mongocxx/options/create_collection.hpp> header.
  • References to deprecated utf8 which have equivalent string alternatives.
    • k_utf8 in bsoncxx::v_noabi::type. Use k_string instead.
    • b_utf8 in bsoncxx::v_noabi::types. Use b_string instead.
    • get_utf8 in bsoncxx::v_noabi::document::element, bsoncxx::v_noabi::array::element, and bsoncxx::v_noabi::types::bson_value::view. Use get_string instead.
    • k_cannot_append_utf8 and k_need_element_type_k_utf8 in bsoncxx::v_noabi::exception::error_code. Use k_cannot_append_string and k_need_element_type_k_string instead.
  • Undocumented using-directives and using-declarations.
    • bsoncxx::builder::types in <bsoncxx/builder/list.hpp>. Use bsoncxx::types in <bsoncxx/types.hpp> instead.
    • bsoncxx::builder::stream::concatenate in <bsoncxx/builder/stream/helpers.hpp>. Use bsoncxx::builder::concatenate in <bsoncxx/builder/concatenate.hpp> instead.
    • mongocxx::events::read_preference in <mongocxx/events/topology_description.hpp>. Use mongocxx::read_preference in <mongocxx/read_preference.hpp> instead.

See the full list of changes in Jira and upgrade guide

Feedback

To report a bug or request a feature, please open a ticket in the MongoDB issue management tool Jira:

Signature Verification

Release artifacts may be verified by using the accompanying detached signature (.asc) and the cpp-driver public key obtained from https://pgp.mongodb.com.

MongoDB C++11 Driver r3.11.0

02 Oct 16:43
24852b6
Compare
Choose a tag to compare

Important

This is the final v3 minor release. Patch releases containing backports for relevant bug fixes will be supported for up to one year after the first v4 release. New features will not be backported.

Added

  • Support for MongoDB Server version 8.0.
  • Stable support for In-Use Encryption Range Indexes.
  • Documentation of the API and ABI versioning and compatibility policy.
  • API documentation pages for directories, files, namespaces, and root namespace redeclarations.
  • empty() member function for mongocxx::v_noabi::bulk_write.

Fixed

  • GCC 4.8.5 (RHEL 7) compatibility issues.
    • Redeclaration error due to bsoncxx::v_noabi::stdx::basic_string_view<...>::npos.
    • User-defined literal syntax error due to bsoncxx::v_noabi::operator"" _bson(const char*, size_t).
  • MSVC 17.11 compatibility issue due to missing <string> include directives.
  • bsoncxx::v_noabi::to_json error handling given invalid BSON documents.
  • Client pool error handling on wait queue timeout per waitQueueTimeoutMS.

Changed

  • Bump the minimum required C Driver version to 1.28.0.
  • Declare all exported function symbols with __cdecl when compiled with MSVC.
    • This does not affect users who compile with MSVC's default calling convention.
    • This is an ABI breaking change for users who use an alternative default calling convention when building their projects (e.g. with /Gz, /Gv, etc.). See Argument Passing and Naming Conventions for more information.
  • FetchContent_MakeAvailable() is used to populate dependencies instead of FetchContent_Populate() for the C Driver (when not provided by CMAKE_PREFIX_PATH) and mnmlstc/core (when automatically selected or when BSONCXX_POLY_USE_MNMLSTC=ON).
    • Note: FetchContent_Populate() is still used for mnmlstc/core for CMake versions prior to 3.18 to avoid add_subdirectory() behavior.
  • Test suite now uses Catch2 v3 via FetchContent instead of the bundled Catch2 v2 standalone header.
    • C++14 or newer is required to build tests when enabled with ENABLE_TESTS=ON.
    • Set ENABLE_TESTS=OFF to avoid the C++14 requirement when building C++ Driver libraries.

Deprecated

  • The bsoncxx/util/functor.hpp header.
  • The bsoncxx::util namespace.

Removed

  • Support for MongoDB Server 3.6. See MongoDB Software Lifecycle Schedules.
  • Export of private member functions in the bsoncxx ABI:
    • bsoncxx::v_noabi::types::bson_value::value::value(const uint8_t*, uint32_t, uint32_t, uint32_t)
    • bsoncxx::v_noabi::types::bson_value::view::_init(void*)
    • bsoncxx::v_noabi::types::bson_value::view::view(const uint8_t*, uint32_t, uint32_t, uint32_t)
    • bsoncxx::v_noabi::types::bson_value::view::view(void*)
  • Export of private member functions in the mongocxx ABI:
    • mongocxx::v_noabi::options::change_stream::as_bson()
    • mongocxx::v_noabi::options::aggregate::append(bsoncxx::v_noabi::builder::basic::document&)
    • mongocxx::v_noabi::options::index::storage_options()

See the full list of changes in Jira.

Feedback

To report a bug or request a feature, please open a ticket in the MongoDB issue management tool Jira:

Signature Verification

Release artifacts may be verified by using the accompanying detached signature (.asc) and the cpp-driver public key obtained from https://pgp.mongodb.com.

MongoDB C++11 Driver r3.10.2

25 Jun 15:12
3166bdb
Compare
Choose a tag to compare

Added

  • SSDLC Compliance Report and related release artifacts.

Fixed

  • Undefined behavior when moving a mongocxx::v_noabi::events::topology_description::server_descriptions object due to uninitialized data member access.

See the full list of changes in Jira.

Feedback

To report a bug or request a feature, please open a ticket in the MongoDB issue management tool Jira:

Signature Verification

Release artifacts may be verified by using the accompanying detached signature (.asc) and the cpp-driver public key obtained from https://pgp.mongodb.com.

MongoDB C++11 Driver r3.10.1

05 Mar 15:58
feb0ae8
Compare
Choose a tag to compare

Fixed

  • (MSVC only) The name of the libbsoncxx package in the "Requires" field of the libmongocxx pkg-config file incorrectly used the library output name instead of the pkg-config package name when ENABLE_ABI_TAG_IN_PKGCONFIG_FILENAMES=OFF.
  • (MSVC only) The translation of the MSVC_RUNTIME_LIBRARY target property into an ABI tag parameter in library and package filenames did not account for generator expressions.

See the full list of changes in Jira.

Feedback

To report a bug or request a feature, please open a ticket in the MongoDB issue management tool Jira:

MongoDB C++11 Driver r3.10.0

23 Feb 21:18
Compare
Choose a tag to compare

Added

  • Forward headers providing non-defining declarations of bsoncxx and mongocxx class types.
    • Note: user-defined forward declarations of any library entity has not been, and is still not, supported.
      To obtain the declaration or definition of a library entity, always include the corresponding header.
  • The CMake option ENABLE_BSONCXX_USE_POLY_IMPLS (OFF by default) allows selecting bsoncxx implementations of C++17 polyfills by default when no polyfill library is requested.
  • The CMake option BSONCXX_POLY_USE_IMPLS (OFF by default) allows selecting bsoncxx implementations of C++17 polyfills instead of external libraries or the C++ standard library.

Changed

  • The bsoncxx::v_noabi and mongocxx::v_noabi namespaces are no longer declared inline.
    • This change is not expected to break source or binary compatibility, but is nevertheless documented here due to its significance. If this change does inadvertently break source or binary compatibility, please submit a bug report.
    • Root namespace declarations are still supported and expected to remain equivalent to their prior definitions (e.g. bsoncxx::document is still equivalent to bsoncxx::v_noabi::document, mongocxx::client is still equivalent to mongocxx::v_noabi::client, etc.). Argument-dependent lookup and template instantiations are expected to remain equivalent to their prior behavior.
    • Note: user-defined forward declarations of any library entity has not been, and is still not, supported.
      To obtain the declaration or definition of a library entity, always include the corresponding header.
  • Library filenames, when compiled with MSVC (as detected by CMake's MSVC variable), are now embedded with an ABI tag string, e.g. bsoncxx-v_noabi-rhs-x64-v142-md.lib.
    • This new behavior is enabled by default; disable by setting ENABLE_ABI_TAG_IN_LIBRARY_FILENAMES=OFF when configuring the CXX Driver.
    • The ABI tag string can also be embedded in pkg-config metadata filenames, e.g. libbsoncxx-v_noabi-rhs-x64-v142-md.pc. This is disabled by default; enable by setting ENABLE_ABI_TAG_IN_PKGCONFIG_FILENAMES=ON (requires ENABLE_ABI_TAG_IN_LIBRARY_FILENAMES=ON).

Removed

  • Deprecated CMake package config files.
    • find_package(libbsoncxx) and find_package(libmongocxx) are no longer supported.
      Use find_package(bsoncxx) and find_package(mongocxx) instead.
    • Accordingly, LIBBSONCXX_* and LIBMONGOCXX_* CMake variables provided by the legacy CMake package config files are no longer supported. Use the mongo::bsoncxx_* and mongo::mongocxx_* CMake targets instead.
    • Note: manually setting compile definitions, include directories, and link libraries is unnecessary with target-based CMake. The former LIBBSONCXX_* and LIBMONGOCXX_* CMake variables are superseded by the target_link_libraries() CMake command, which automatically propagates the necessary compile definitions, include directories, and link libraries to dependent targets via mongo::bsoncxx_* and mongo::mongocxx_* interface properties.
  • Experimental C++ standard library as a polyfill option via BSONCXX_POLY_USE_STD_EXPERIMENTAL.

See the full list of changes in Jira.

Feedback

To report a bug or request a feature, please open a ticket in the MongoDB issue management tool Jira:

MongoDB C++11 Driver r3.9.0

08 Nov 19:01
56da1f0
Compare
Choose a tag to compare

Added

  • The C++ driver container image is now available on Docker hub.
  • Document availability of on vcpkg and Conan.
  • Add CMake option MONGOCXX_OVERRIDE_DEFAULT_INSTALL_PREFIX (default is TRUE
    for backwards-compatibility). If enabled, CMAKE_INSTALL_PREFIX defaults to the build directory.
  • Add API to manage Atlas Search Indexes.
  • Automatically download C driver dependency if not provided.
  • Add VERSIONINFO resource to bsoncxx.dll and mongocxx.dll.

Changed

  • Do not build tests as part of all target. Configure with BUILD_TESTING=ON to build tests.
  • Bump minimum required CMake version to 3.15 to support the FetchContent module and for consistency with the C Driver.
  • Improve handling of downloaded (non-system) mnmlstc/core as the polyfill library.
    • Use FetchContent instead of ExternalProject to download and build the library.
    • Do not patch include directives in mnmlstc/core headers.
  • Bump minimum C Driver version to 1.25.0.

Fixed

  • Explicitly document that throwing an exception from an APM callback is undefined behavior.
  • Do not prematurely install mnmlstc/core headers during the CMake build step.
  • Require a C Driver CMake package is found via find_dependency() for all installed CXX Driver package configurations.

Removed

  • Remove support for exported targets from the CMake project build tree.
  • Drop support for the following operating systems:
    • macOS 10.14 and 10.15
    • Ubuntu 14.04

See the full list of changes in Jira.

Feedback

To report a bug or request a feature, please open a ticket in the MongoDB issue management tool Jira:

MongoDB C++11 Driver r3.8.1

05 Oct 23:17
Compare
Choose a tag to compare

Release Notes - C++ Driver - Version 3.8.1

Bug

  • [CXX-2295] - [ChangeStream] options::change_stream::start_at_operation_time accept uses internal bsoncxx::types::b_timestamp in API
  • [CXX-2726] - Do not override CMAKE_BUILD_TYPE for multi-config generators

New Feature

Improvement

  • [CXX-2480] - Update docs.mongodb.com links in source, API & Reference documentation

MongoDB C++11 Driver r3.8.0

21 Jun 14:19
2e645d0
Compare
Choose a tag to compare

Release Notes - C++ Driver - Version 3.8.0

What's New

  • Support MongoDB server version 6.0 and 7.0
  • Support C++20 language standard
  • Support updated Queryable Encryption protocol
    • Introduces backwards breaking changes to the Queryable Encryption protocol. Using Queryable Encryption now requires MongoDB server version 7.0+.
  • Support new Queryable Encryption features
    • Add client_encryption::create_encrypted_collection to automatically create data encryption keys when creating a new encrypted collection.
  • Support new security features
    • Add ability to fetch KMS credentials automatically from Azure, GCP, and AWS environments.
    • Support authentication with KMS AWS temporary credentials.
    • Cache fetched AWS credentials.
    • Support AWS IAM Roles for service accounts, EKS in particular.
  • Add srvMaxHosts option to limit the number of mongos servers used in connecting to sharded clusters.
  • Retry operations if the connection handshake fails.

Dependency updates

  • Minimum C Driver (libmongoc) version bumped to 1.24.0.

Deprecations and Removals

Support for below operating systems will be dropped in an upcoming release.

  • macOS 10.14
  • macOS 10.15
  • Ubuntu 14.04

Bug

  • [CXX-2451] - Kerberos on Windows should not pass username to SSPI when password is not set
  • [CXX-2548] - Disable causal consistency in implicit sessions
  • [CXX-2599] - Error if RewrapManyDataKey is called with masterKey and without provider
  • [CXX-2670] - options::aggregate::append ignores readConcern

New Feature

  • [CXX-2307] - Add native support for AWS IAM Roles for service accounts, EKS in particular
  • [CXX-2318] - Provide options to limit number of mongos servers used in connecting to sharded clusters
  • [CXX-2425] - Key Management API
  • [CXX-2474] - Add ClientEncryption entity and Key Management API operations to Unified Test Format
  • [CXX-2496] - Add Queryable Encryption behavior for CreateCollection() and Collection.Drop()
  • [CXX-2500] - Add Queryable Encryption API to AutoEncryptionOpts
  • [CXX-2502] - Add Queryable Encryption API to ClientEncryptionOpts
  • [CXX-2508] - Obtain AWS credentials for CSFLE in the same way as for MONGODB-AWS
  • [CXX-2546] - Automatically create Queryable Encryption keys
  • [CXX-2554] - Cache AWS Credentials Where Possible

Improvement

  • [CXX-1712] - Overload bsoncxx::to_json to accept a bsoncxx::array::view
  • [CXX-2172] - Support AWS authentication with temporary credentials in CSFLE
  • [CXX-2284] - Append platform data to handshake
  • [CXX-2344] - Use OP_MSG to authenticate if server supports OP_MSG
  • [CXX-2393] - Drivers should retry operations if connection handshake fails
  • [CXX-2394] - Require hello command for connection handshake to use OP_MSG, disallowing OP_QUERY
  • [CXX-2433] - Support In-Use Encryption Shared Library
  • [CXX-2441] - Add example of iterating change stream indefinitely
  • [CXX-2490] - Make allowDiskUse opt-out rather than opt-in in 6.0
  • [CXX-2491] - Clustered Indexes for all Collections
  • [CXX-2517] - Support for Range Indexes
  • [CXX-2527] - Reduce expected removeKeyAltName operations to a single findOneAndUpdate
  • [CXX-2528] - Ensure "does not fail" in CSE Prose Test 13 accounts for (no) matching documents
  • [CXX-2534] - Allow RewrapManyDataKeyResult.bulkWriteResult to be optional
  • [CXX-2551] - Add support for GCP attached service accounts when using GCP KMS
  • [CXX-2562] - Error if RewrapManyDataKey is called with libmongocrypt < 1.5.2
  • [CXX-2565] - Support the Azure VM-assigned Managed Identity for Automatic KMS Credentials
  • [CXX-2610] - Improve test coverage for retryable handshake errors
  • [CXX-2637] - Deprecate currentOp/collStats commands by 7.0
  • [CXX-2642] - Drivers should not create the ECC collection in v2 of queryable encryption
  • [CXX-2664] - Bump maxWireVersion for MongoDB 7.0

See full list of changes in JIRA.

Reporting Issues

Think you’ve found a bug? Want to see a new feature in the C++ Driver? Please open a case in our issue management tool, Jira:
  • Create an account and login.
  • Navigate to the CXX project.
  • Click Create Issue. Please provide as much information as possible about the issue type and how to reproduce it.
  • Bug reports in Jira for all driver projects (i.e. CXX, CDRIVER etc) and the Core Server (i.e. SERVER) projects are public.

MongoDB C++11 Driver r3.7.2

06 Jun 19:37
Compare
Choose a tag to compare

Release Notes - C++ Driver - Version 3.7.2

Bug

  • [CXX-2686] - Fails to compile with GCC 13.0.1

MongoDB C++11 Driver r3.7.1

14 Mar 17:40
a94ee66
Compare
Choose a tag to compare

Release Notes - C++ Driver - Version 3.7.1

Bug

  • [CXX-2584] - Update libmongoc dependency to 1.22.1 in CMakeLists.txt
  • [CXX-2650] - Fix limit value in open_download_stream

Improvement

  • [CXX-2629] - Remove requirement to set `/Zc:__cplusplus` in MSVC flags