Skip to content

Releases: mongodb/mongo-cxx-driver

MongoDB C++11 Driver r4.4.0

Choose a tag to compare

@kevinAlbs kevinAlbs released this 24 Jun 16:38
597ba45

Important

This is the first release supporting a stable ABI for the bsoncxx and mongocxx libraries.

  • The stable ABI is declared under the v1 namespace of the bsoncxx and mongocxx libraries.
  • The unstable ABI declared under the v_noabi namespace is still supported.
  • Root namespace redeclarations (e.g. bsoncxx::document::value) are recommended when ABI stability is not a requirement. These redeclarations will be updated to the latest ABI version equivalents in an upcoming API major release.

See ABI Versioning for more information.

Fixed

  • Include of v1/text_options.hpp (normal header) by options/text-fwd.hpp (forward header).
  • Include of v_noabi macro guard headers by text_options.hpp (v1).

Deprecated

Changed

  • Stable ABI (v1) is now officially supported for both bsoncxx and mongocxx libraries.
  • The soversion for both bsoncxx and mongocxx libraries is now set to 1.
  • Library filenames now include the ABI version number, e.g. libbsoncxx1.so.4.4.0.
  • pkg-config config filenames now include the ABI version number, e.g. libbsoncxx1.pc.
  • CMake package config filenames now use camelCase, e.g. bsoncxxConfig.cmake.
  • Bump the minimum required C Driver version to 2.3.1.

Added

  • Support for the "readConcern" option field to "delete", "insert", "replace", "bulkWrite", "findOneAnd*", "count", and "distinct" operations.
  • Support for MONGODB-OIDC authMechanism.
  • Support for client bulk write API (mongocxx::client_bulk_write).

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 r4.3.1

Choose a tag to compare

@kevinAlbs kevinAlbs released this 02 Jun 13:36
8edd5f4

Fixed

  • Do not set upsert: true in "findOneAnd*" operations when the option is explicitly set to false (regression in 4.2.0).

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 r4.3.0

Choose a tag to compare

@eramongodb eramongodb released this 22 Apr 16:53
9b0c132

Fixed

  • Added missing subscript operators for class types declared in bsoncxx::vector::iterators.

Deprecated

  • Support for Visual Studio 2015 (EOL since Oct 2025). Use Visual Studio 2017 or newer.

Changed

  • Bump the minimum required C Driver version to 2.3.0.

Added

  • Added support for MongoDB's Intelligent Workload Management (IWM) and ingress connection rate limiting features. The driver now gracefully handles write-blocking scenarios and optimizes connection establishment during high-load conditions to maintain application availability.
    • Supported on all commands.
    • Custom application retry logic may need to be adjusted to avoid retrying too long.
    • Upgrade is recommended to avoid impacts of server changes related to overload errors.
      • If not upgrading, custom application retry logic may need to be adjusted to handle higher rates of overload errors.
    • Add URI option maxAdaptiveRetries to configure the maximum number of retries for operations that fail with a SystemOverloadedError (default: 2).
    • Add URI option enableOverloadRetargeting to control whether retries of SystemOverloadedError will attempt to use a different server (default: false).
  • Added support for the "readConcern" option field to "find" and "update" operations.

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 r4.2.0

Choose a tag to compare

@kevinAlbs kevinAlbs released this 24 Mar 13:18
dd18454

Important

This release removes and changes the exports of many unstable ABI symbols.
As a reminder, recompilation is required to link with a new release of the unstable ABI for mongo-cxx-driver libraries.

Added

  • Experimental support for stable ABI interfaces under the v1 namespace for both bsoncxx and mongocxx libraries.
  • To support incremental migration, the following entities are defined as equivalent to their renamed counterparts.
    • bsoncxx::types::id: equivalent to bsoncxx::type.
    • bsoncxx::types::binary_subtype: equivalent to bsoncxx::binary_sub_type.
    • bsoncxx::types::view: equivalent to bsoncxx::types::bson_value::view.
    • bsoncxx::types::value: equivalent to bsoncxx::types::bson_value::value.
    • type_view() in bsoncxx::document::element and bsoncxx::array::element: equivalent to get_value().
    • type_value() in bsoncxx::document::element and bsoncxx::array::element: equivalent to get_owning_value().
  • Experimental support for In-Use Encryption Text Indexes (mongocxx::v1::text_options).
  • Change stream helpers for convenient iteration (mongocxx::v1::change_stream::next and mongocxx::v1::change_stream::try_next).

Changed

Important

This release provides an experimental stable ABI for bsoncxx and mongocxx.

  • For consistency with the library and package filenames of MongoDB C Driver 2.0.0 and newer:
    • CMake package config files now use the <name>Config.cmake and <name>ConfigVersion.cmake pattern. (Old: <name>-config.cmake and <name>-config-version.cmake)
  • CMake 3.16.0 or newer is required when ENABLE_TESTS=ON for compatibility with the updated Catch2 library version (3.7.0 -> 3.8.1).
  • Minimum supported compiler versions to build from source are updated to the following:
  • mongocxx::v_noabi::instance::~instance() no longer skips calling mongoc_cleanup() when compiled with ASAN enabled.
  • Bump the minimum required C Driver version to 2.2.3.

Deprecated

  • mongocxx::v_noabi::instance::current() is "for internal use only". The instance constructor(s) should be used instead.
    • Creating the instance object in the scope of main(), or in an appropriate (non-global) scope such that its (non-static) lifetime is valid for the duration of all other mongocxx library operations, is recommended over the following workarounds.
    • If there is only one call to current() present within an application, it may be replaced with a static local variable:
      // Before:
      mongocxx::instance::current();
      
      // After:
      static mongocxx::instance instance; // Only ONE instance object!
    • If there are multiple calls to current() present within an application, they may be replaced with a call to a user-defined function containing the static local variable:
      mongocxx::instance& mongocxx_instance() {
        static mongocxx::instance instance; // Only ONE instance object!
        return instance;
      }
  • These following entities will be renamed (and removed) in an upcoming major release. To support incremental migration, both old and new names are still provided.
    • bsoncxx::type -> bsoncxx::types::id.
    • bsoncxx::binary_sub_type -> bsoncxx::types::binary_subtype.
    • bsoncxx::types::bson_value::view -> bsoncxx::types::view
    • bsoncxx::types::bson_value::value -> bsoncxx::types::value
    • get_value() -> type_view() in bsoncxx::document::element and bsoncxx::array::element.
    • get_owning_value() -> type_value() in bsoncxx::document::element and bsoncxx::array::element.

Removed

Fixed

  • Do not throw when comparing mongocxx::result::insert_many with non-ObjectID IDs.

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 r4.1.4

Choose a tag to compare

@kevinAlbs kevinAlbs released this 08 Oct 17:17
4f52739

Changed

  • Bump the auto-downloaded C Driver version to 2.1.2.

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.11.1

Choose a tag to compare

@kevinAlbs kevinAlbs released this 08 Oct 15:31
bc5daf4

Fixed

  • The API version of auto-downloaded C Driver libraries no longer incorrectly inherits the C++ Driver's BUILD_VERSION value.

Changed

  • Bump the minimum required C Driver version to 1.30.6.

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 r4.1.3

Choose a tag to compare

@kevinAlbs kevinAlbs released this 30 Sep 18:58
6912cfb

Changed

  • Bump the auto-downloaded C Driver version to 2.0.2.

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 r4.1.2

Choose a tag to compare

@kevinAlbs kevinAlbs released this 03 Sep 15:09
eadecf0

Fixed

  • storage_engine() const in mongocxx::v_noabi::options::index is correctly exported using mongocxx export macros instead of bsoncxx export macros.
  • Fix -Wdeprecated-literal-operator warning.

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 r4.1.1

Choose a tag to compare

@kevinAlbs kevinAlbs released this 01 Jul 14:37
527fa3c

Fixed

  • CMake option ENABLE_TESTS (OFF by default) is no longer overwritten by the auto-downloaded C Driver (ON by default) during CMake configuration.
  • Static pkg-config files are updated to depend on the static (not shared) libbson / libmongoc packages.
  • Fix build if macros GCC/GNU/Clang/MSVC are already defined.

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 r4.1.0

Choose a tag to compare

@kevinAlbs kevinAlbs released this 01 May 19:43
c6be26d

Fixed

  • The API version of auto-downloaded C Driver libraries no longer incorrectly inherits the C++ Driver's BUILD_VERSION value.
  • Potentially unchecked narrowing conversion in bsoncxx::v_noabi::builder::core::append() now throws an exception with error code k_cannot_append_string.

Added

  • storage_engine() in mongocxx::v_noabi::options::index.
  • Support for sort option with replaceOne and updateOne operations.
  • Support for BSON Binary Vector.
  • Support $lookup in CSFLE and QE.

Deprecated

  • Support for MacOS 11 (EOL since Nov 2020) and MacOS 12 (EOL since Oct 2021).
  • storage_options() in mongocxx::v_noabi::options::index: use storage_engine() instead.
    • base_storage_options and wiredtiger_storage_options in mongocxx::v_noabi::options::index are also deprecated.
  • hedge() in mongocxx::v_noabi::read_preference: hedged reads will no longer be supported by MongoDB.

Changed

  • Bump the minimum required C Driver version to 2.0.0.
  • Set CMake maximum policy version to 4.0.
    • The CMake minimum required version is still 3.15.
  • C++17 polyfill implementations for optional<T> and string_view are now declared in the bsoncxx::v1::stdx namespace.
    • The bsoncxx::v_noabi::stdx namespace now contains type aliases to their v1 equivalents.
    • This is an ABI breaking change for all symbols which reference bsoncxx::v_noabi::stdx in their declaration (including mongocxx library symbols).
      • This does not affect users who compile with C++17 or newer and have not set BSONCXX_POLY_USE_IMPLS=ON.

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.