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)