Releases: mongodb/mongo-rust-driver
v3.2.0
The MongoDB Rust driver team is pleased to announce the v3.2.0 release of the mongodb
crate, now available for download from crates.io.
Highlighted Changes
Stable API for In-Use Encryption
The API for in-use encryption is now stable and has the same backwards compatibility guarantees as the rest of the driver. To reflect this, the feature is now named in-use-encryption
; in-use-encryption-unstable
will continue to be provided as a compatibility alias. Please note that this is a policy change only and that the API itself has not changed from the previous release.
Improved documentation for option setters
When looking at the rustdoc for methods with chainable setters for options (e.g. Collection::find
), those setters are listed directly in the rustdoc for the method rather than only being visible in the rustdoc for the type of the returned future.
Upcoming Change: EOL for Server Version 4.0
In the next minor version release (3.3.0), the Rust driver will be dropping support for connecting to mongodb server version 4.0. As of that release, the minimum supported server version will be 4.2.
Full Release Notes
Below are a selected list of changes with user impact; for a full list of changes see this GitHub query.
New Features
- RUST-2030 Add more event fields: lsid, txnNumber and disambiguatedPaths (#1197) (thanks @arthurprs!)
- RUST-2001 Allow SRV hostnames with less than three parts (#1211)
- RUST-2002 Allow update to supply sort option (#1222)
- RUST-911: Add srvServiceName URI option (#1235)
- RUST-226 Support tlsCertificateKeyFilePassword (#1256)
- RUST-1905 Add Kubernetes Support for OIDC (#1276)
- RUST-2006 Add option to configure DEK cache lifetime (#1284)
Improvements
- RUST-1795 Remove unstable from in-use encryption (#1191)
- track task spawn location for tokio instrumentation (#1201) (thanks @hds!)
- RUST-1437 Send endSessions on client shutdown (#1216)
- RUST-229 Parse IPv6 addresses in the connection string (#1242)
- RUST-1222 Cancel in-progress operations when SDAM heartbeats time out (#1249)
- RUST-2116: bump msrv to 1.71.1 (#1265)
- RUST-2103 Better documentation for action options (various)
- chore: upgrade reqwest to v0.12 and hyper to v1 (#1278) (thanks @zitsen!)
- Make EncryptedClientBuilder publicly accessible (#1282)
- RUST-1894 Retry KMS requests on transient errors (#1281)
Bugfixes
v3.1.1
v3.1.0
The MongoDB Rust driver team is pleased to announce the v3.1.0 release of the mongodb
crate, now available for download from crates.io.
This release provides compatibility with MongoDB 8.0, including support for a number of new in-use encryption features.
Full Release Notes
Features
- RUST-1813 Support for more than one KMS provider per type (#1141)
- RUST-1843 Support for QE range protocol V2 (#1132)
- RUST-1845 Support search index type field (#1147)
- RUST-1926 Support range indexes as GA (#1184)
Improvements
- RUST-1994 Implement happy eyeballs for TCP connection (#1183)
- RUST-1791 Publish an event changing topology state to unknown before closing (#1160)
- RUST-1980 Bump dependencies (#1142) (thanks @attila-lin!)
Tasks
v3.0.1
The MongoDB Rust driver team is pleased to announce the v3.0.1 release of the mongodb
crate, now available for download from crates.io.
This release fixes two bugs:
- Aggregations with both explicit sessions and custom types wouldn't compile, and
Collection::watch
didn't use theCollection
's type parameter
Full Release Notes
Bugfixes
v3.0.0
The MongoDB Rust driver team is pleased to announce the v3.0.0 release of the mongodb
crate, now available for download from crates.io.
Highlighted Changes
Breaking Changes
3.0 introduces a wide variety of improvements that required backwards-incompatible API changes; in most cases these changes should require only minor updates in application code.
Most notably:
- Fluent API: Async methods that accepted options have been updated to allow the individual options to be given directly in line with the call to reduce required boilerplate.
- Events: 3.0 introduces the
EventHandler
type, which can be constructed from a callback, async callback, or an async channel sender. - Async Runtime: 3.0 only supports
tokio
; support forasync-std
has been discontinued.
For detailed information on breaking changes and examples of migrating from 2.x to 3.0, please see the migration guide.
Bulk Write
The Rust driver now implements the new Bulk Write specification, which supports performing mixed write operations against multiple namespaces in a minimized number of round-trips to the server. This feature is only available for early testing using MongoDB 8.0 release candidate binaries. This feature is not recommended for use in production until the stable release of MongoDB 8.0.
OIDC Authentication
The Rust driver can now authenticate using an OpenID Connect access token, including support for both the machine and human authentication flows, and automatic token acquisition for Azure and GCP.
Included Changes
Below are a selected list of other changes with user impact; for a full list of changes see this GitHub query.
Breaking Changes
- RUST-1810 Clean up concern helpers (#1011)
- RUST-1603 Support the authorized_collections option (#1033)
- RUST-1876 Require T: Send + Sync for Collection (#1043)
- RUST-1306 Move Compression enum behind compression feature flags (#1055)
- RUST-1563 Make ReadPreferenceOptions optional (#1059)
- RUST-1208 Future-proof features (#1062)
- RUST-1764 Drop human_readable options in favor of HumanReadable (#1064)
- RUST-1695 Use consistent defaults for TypedBuilder (#1072)
- RUST-1364 Collapse comment and comment_bson (#1070)
New Features
- RUST-1652 Add a find_one method to GridFsBucket (#1015)
- RUST-1856 expose Database::client (#1035) (thanks dgrijalva!)
- RUST-1830 Support KMIP delegated protocol (#1115)
Improvements
- chore: bump socket2 to 0.5 (#1020) (thanks attila-lin!)
- chore: move lazy_static to once_cell (#1022) (thanks attila-lin!)
- RUST-1631 Always use polling monitoring when running in a FaaS environment (#1030)
Bugfixes
v3.0.0-beta
The MongoDB Rust driver team is pleased to announce the v3.0.0-beta release of the mongodb
crate, now available for download from crates.io.
Highlighted Changes
Breaking Changes
3.0 introduces a wide variety of improvements that required backwards-incompatible API changes; in most cases these changes should require only minor updates in application code.
Most notably:
- Fluent API: Async methods that accepted options have been updated to allow the individual options to be given directly in line with the call to reduce required boilerplate.
- Events: 3.0 introduces the
EventHandler
type, which can be constructed from a callback, async callback, or an async channel sender. - Async Runtime: 3.0 only supports
tokio
; support forasync-std
has been discontinued.
For detailed information on breaking changes and examples of migrating from 2.x to 3.0, please see the migration guide.
Bulk Write
The Rust driver now implements the new Bulk Write specification, which supports performing mixed write operations against multiple namespaces in a minimized number of round-trips to the server. This feature is only available for early testing using MongoDB 8.0 release candidate binaries. This feature is not recommended for use in production until the stable release of MongoDB 8.0.
OIDC Authentication
The Rust driver can now authenticate using an OpenID Connect access token, including support for both the machine and human authentication flows, and automatic token acquisition for Azure and GCP.
Included Changes
Below are a selected list of other changes with user impact; for a full list of changes see this GitHub query.
Breaking Changes
- RUST-1810 Clean up concern helpers (#1011)
- RUST-1603 Support the authorized_collections option (#1033)
- RUST-1876 Require T: Send + Sync for Collection (#1043)
- RUST-1306 Move Compression enum behind compression feature flags (#1055)
- RUST-1563 Make ReadPreferenceOptions optional (#1059)
- RUST-1208 Future-proof features (#1062)
- RUST-1764 Drop human_readable options in favor of HumanReadable (#1064)
- RUST-1695 Use consistent defaults for TypedBuilder (#1072)
- RUST-1364 Collapse comment and comment_bson (#1070)
New Features
- RUST-1652 Add a find_one method to GridFsBucket (#1015)
- RUST-1856 expose Database::client (#1035) (thanks @dgrijalva!)
- RUST-1830 Support KMIP delegated protocol (#1115)
Improvements
- chore: bump socket2 to 0.5 (#1020) (thanks @attila-lin!)
- chore: move lazy_static to once_cell (#1022) (thanks @attila-lin!)
- RUST-1631 Always use polling monitoring when running in a FaaS environment (#1030)
Bugfixes
v2.8.2
The MongoDB Rust driver team is pleased to announce the v2.8.2 release of the mongodb
crate, now available for download from crates.io.
This release fixes a potential issue when serializing messages.
Full Release Notes
Improvements
Bugfixes
v2.8.1
The MongoDB Rust driver team is pleased to announce the v2.8.1 release of the mongodb
crate, now available for download from crates.io.
This release fixes two bugs:
- on-demand KMS credentials wouldn't work with automatic encryption, and
- initial connection responses from the server could fail to parse under certain circumstances.
Full Release Notes
Bugfixes
v2.8.0
The MongoDB Rust driver team is pleased to announce the v2.8.0 release of the mongodb
crate, now available for download from crates.io.
Highlighted Changes
Search Index Management Helpers
The Collection
type now has the create_search_index
, create_search_indexes
, update_search_index
, drop_search_index
, and list_search_indexes
methods, allowing comprehensive management of search indexes from client code.
Reliability Improvements
More error types will be automatically retried, and retries will avoid mongos backends with network connectivity issues. Also note that the documentation for with_transaction
has been updated to clarify error handling requirements to avoid a deadlock.
Included Changes
Below are a selected list of changes with user impact; for a full list of changes see this GitHub query.
New Features
- RUST-1703 Add docker and kubernetes metrics (#940)
- RUST-1701 Log when CosmosDB or DocumentDB are detected (#958)
- RUST-1707 Add durations to connection pool events (#976)
- RUST-933 Add support for the srvMaxHosts option (#977)
- RUST-1667 Add search index management helpers (#989)
Improvements
- RUST-877 Delay replacement document serialization until
Operation::build
(#942) - RUST-1763 deprecate CollectionOptions::human_readable_serialization (#957)
- RUST-1414 disable causal consistency for implicit sessions (#969)
- RUST-935 direct retries to different mongos (#968)
- docs: remove pointless recommendation (#973) (thanks @cailloumajor!)
- RUST-1780 Bump MSRV to 1.61.0, upgrade ahash to 0.8.5 in
MSRV-Cargo.lock
(#981) (thanks @stIncMale!) - RUST-1676 Simplify GenericCursor by refactoring the
GetMoreProvider
trait into a generic struct (#983) (thanks @stIncMale!) - RUST-1804 Replace async_once with tokio::sync::OnceCell (#992) (thanks @Expyron!)
- RUST-1786 Make ReadConcernMajorityNotAvailableYet a retryable read error (#996)
- RUST-1785 Make ExceededTimeLimit a read-retryable error (#997)
- RUST-1788 Update docs for with_transaction to avoid infinite loop (#998)