Skip to content

v2.0.0-beta.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@patrickfreed patrickfreed released this 06 Aug 19:39

Description

The MongoDB Rust driver team is pleased to announce the v2.0.0-beta.3 release of the mongodb crate. This is the fourth beta release in preparation for the 2.0.0 stable release, and it contains a few breaking changes, API improvements, and bug fixes that were not included in the previous betas. As with the previous betas, we do not intend to make any further breaking changes before v2.0.0, but we may do so in another beta if any issues arise before then.

Highlighted changes

The following sections detail some of the more important changes included in this release. For a full list of changes, see the Full Release Notes section.

Update version of bson to v2.0.0-beta.3

The exported version of bson was updated to v2.0.0-beta.3, which includes its own set of changes. Check out the bson release notes for more information.

Support for transactions on sharded topologies (#408)

Support for replica set transactions was introduced in a previous release, and this release expands that support to include sharded clusters! Note that sharded transactions are only supported in MongoDB 4.2+.

Direct BSON serialization / deserialization (#389, #406)

The driver was updated to leverage the new raw BSON serialization / deserialization functionality introduced in version 2.0.0-beta.3 of the bson crate, significantly improving the performance of reads and inserts. Initial (rough) benchmarks indicate that large inserts and reads could execute in half the time (or less) than they used to.

Note that as part of this, the generic bound on Collection is now required to be Sync and Send.

Versioned API support (#401)

MongoDB 5.0 introduced the Versioned API, and this release includes support for specifying it via the ClientOptions.

Full Release Notes

New Features

Improvements

  • RUST-901 Bump bson dependency to 2.0.0-beta.3
  • RUST-870 Deserialize server response directly from raw BSON bytes (#389) (breaking)
  • RUST-871 Serialize directly to BSON bytes in insert operations (#406)
  • RUST-725 Use "hello" for handshake and heartbeat when an API version is declared (#380)
  • RUST-768 Pass versioned API parameters to getMore and transaction-continuing commands. (#397)
  • RUST-836 Support the 'let' option for aggregate (#391)
  • RUST-887 Use HashMap::contains in Error::contains_label (#386)

Bugfixes

  • RUST-570 Improve compile times of the test suite (#412)
  • RUST-793 Reduce size of returned futures (#417)
  • RUST-945 Check that explicit sessions were created on the correct client (#405)

Tasks

  • RUST-795 Update versioned api connection examples (#400)
  • RUST-670 Expect unified test format operations to succeed (#388)
  • RUST-665 Sync spec tests for field names with dots and dollars (#385)
  • RUST-734 Document support for sharded transactions
  • RUST-605 Update Versioned API Documentation
  • RUST-873 Test redaction of replies to security-sensitive commands
  • RUST-881 Run test suite with requireApiVersion 1
  • RUST-895 Update documentation for Time Series
  • RUST-944 Integration tests for observeSensitiveCommands
  • RUST-749 Convert CRUD tests to unified format (#410)
  • RUST-773 Update CMAP spec tests to prevent cross-test failpoint interference (#395)
  • RUST-774 Allow tests to specify backgroundThreadIntervalMS to fix a race condition. (#396)
  • RUST-775 CMAP integration test waits for wrong event
  • RUST-859 Improve bson_util function consistency (#411)
  • RUST-905 Try reading the default server URI from a local file if $MONGODB_URI is unset (#409)