v1.2.0
Description
The MongoDB Rust driver team is pleased to announce the v1.2.0 release of the driver.
Release Notes
Serde Integration Improvements
This release contains several improvements to the driver's integration with Serde.
- RUST-562 Return deserializable data types from find methods
- RUST-561 Accept serializable data types as arguments to insert methods
Connection Pooling Improvements
This release contains several bug fixes and improvements to the connection pooling behavior in the driver. These improvements should both improve performance and also reduce the risk of “connection storms”.
Some highlighted changes:
- The driver was erroneously holding onto the mutex on the connection pool while establishing connections, greatly limiting throughput. This has been fixed, so now the pool may be used even when new connections are being established. (RUST-542)
- Concurrent connection creation is now limited to 2 at a time, reducing the spike in connections that can happen after an increase in load, a primary election, or a reduction in throughput server-side. This limit also favors the reuse of existing connections over concurrently creating large amounts of connections, which in initial benchmarks is shown to have a positive impact on throughput. (RUST-556)
- The server selection algorithm now considers the load of suitable servers when choosing among them, opting for nodes currently experiencing less load. This should more evenly distribute the workload across the deployment. (RUST-575)
- Once the driver notices a server has gone down, it now “pauses” the associated connection pool, ensuring no new connection establishment attempts can be made against that server until it enters a known state again. Previously, there was a window in which these connection establishments could still be attempted even after the driver noticed that a server went down, and these establishment attempts could put unnecessary strain on such servers that were likely already struggling. (RUST-690)
- The driver no longer incorrectly uses the “maxPoolSize” URI option to set “minPoolSize”. (RUST-566)
Other New Features
- RUST-514 Add optional bson u2i feature
- RUST-617 Add BSON benchmarks
- RUST-611 Add benchmarks to driver
- RUST-325 Implement hedged read support
- RUST-197 Add plain authentication
- RUST-533 Add sync ClientOptions::parse
- RUST-371 Implement speculative authentication
Improvements
- RUST-623 Upgrade
os_info
to 3.0.1 - RUST-690 Pause connection pool when server is marked Unknown
- RUST-613 Upgrade
typed-builder
to 0.4.0 - RUST-598 Perform handshake when establishing monitoring connections
- RUST-562 Exclude unnecessary files