Skip to content

Releases: mongodb/mongo-rust-driver

v1.2.0

16 Feb 22:32
d75355f
Compare
Choose a tag to compare

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

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

Bug Fixes

  • RUST-592 Fix race condition in server monitoring
  • RUST-576 Fix count_document fails when writeConcern set on Collection
  • RUST-565 Properly report connection closures due to error

v2.0.0-alpha

30 Jan 00:37
Compare
Choose a tag to compare
v2.0.0-alpha Pre-release
Pre-release

Description

The MongoDB Rust driver team is pleased to announce the v2.0.0-alpha release of the driver, with support for tokio 1.x.

Release Notes

This release is an unstable alpha which has the primary goal of introducing official support for tokio 1.x. It currently contains features that are not yet complete, but we wanted to get this release out as soon as possible to enable users to start working with the driver and tokio 1.x. The API is unstable and subject to breakages as we work towards a stable 2.0 release.

v1.1.1

01 Sep 21:25
Compare
Choose a tag to compare

Description

The MongoDB Rust driver team is pleased to announce the v1.1.1 release of the driver.

Release Notes

Bug Fixes

  • RUST-544 Ensure correct termination of monitoring tasks
  • #241 remove accidental dependency on openssl
  • RUST-541 Include async runtime information in client metadata

v1.1.0

19 Aug 00:50
Compare
Choose a tag to compare

Description

The MongoDB Rust driver team is pleased to announce the v1.1.0 release of the driver.

Release Notes

In addition to the changes for v1.1.0-beta, the following changes were made in v1.1.0:

Bug Fixes

  • RUST-384 Close connection which was dropped during command execution (#214)
  • RUST-530 Decrement connection count when connection is dropped due to unfinished operation

New Features

  • RUST-51 Implement retryable writes

v1.1.0-beta

31 Jul 00:23
6a28f4a
Compare
Choose a tag to compare
v1.1.0-beta Pre-release
Pre-release

Description

The MongoDB Rust driver team is pleased to announce the v1.1.0-beta release of the driver.

Release Notes

Bug fixes

  • RUST-8 Create/modify collection helpers needs to support creating "validators"
  • RUST-524 Add non_exhaustive label to structs and enums missing it

New Features

  • RUST-13 Add "indexOptionDefaults" to createCollection()
  • RUST-128 Implement retryable reads
  • RUST-359 Implement MONGODB-AWS authentication support
  • RUST-362 Allow passing hint to findAndModify operations
  • RUST-372 Allow passing hint to delete operations
  • RUST-376 Allow pasing hint to update operations
  • RUST-370 Add "errInfo" field to write concern errors
  • RUST-483 Allow alternate SRV resolver configs

Improvements

  • RUST-170 Enable and configure TCP Keepalive by default
  • RUST-479 Lift restriction on authSource without credentials
  • RUST-502 Standardize behavior of empty authSource URI option

v1.0.0

08 Jun 15:29
6d37f7c
Compare
Choose a tag to compare

Description

The MongoDB Rust driver team is pleased to announce the first stable release of the driver, v1.0.0. This release marks the general availability of the driver. Additionally, per semver requirements, no breaking API changes will be made to the 1.x branch of the driver.

Major Features

See the releases notes for v0.11.0 for recent changes made to the driver before this release.

Special thanks

Thanks to everyone who contributed code and/or advice along our path to 1.0, including @nevi-me, @ttdonovan, @petoknm, @judy2k, @freakmaxi, @brunobell, @andywswan, @UmerMIB, @DarkEld3r, @yoshuawuyts, and @LucioFranco!

v0.11.0

03 Jun 18:46
7156e1e
Compare
Choose a tag to compare

Description

The MongoDB Rust driver team is pleased to announce the first release candidate of the driver, v0.11.0.

Major Features

In preparation of stabilizing the API of the driver, we made a number of breaking changes. The
individual changes are listed below in the release notes, each with a short description of why we
made the change.

Release Notes

Breaking Changes

  • RUST-261 Mark enums and options struct as non-exhaustible
    • In order to ensure that adding new variants to our enums (e.g. mongodb::error::ErrorKind) in
      the future will not cause breaking changes for users who are pattern matching them, we've
      marked some of them as non-exhaustive. Additionally, in order to be able to add new options to
      our options structs in the future, we've also marked them as non-exhaustive. This has the
      side-effect of making them impossible to instantiate with struct literals. The workaround is to
      use the auto-generated builder pattern API for them, which continues to be available as before.
  • RUST-434 Rewrite ReadConcern as a struct
    • In order to allow us to add any potential new read concern options that might be added in the
      future, we've changed mongodb::options::ReadConcern to be a (non-exhaustive) struct rather
      than an enum. To ensure that it's easy to use, we've added a helper method for each ReadConcern
      level to faciliatate construction.
  • RUST-433 Rename "Tag" Acknowledgement case to "Custom"
    • The original name for this enum variant was a bit misleading. The official documentation for
      write
      concerns

      has since been updated to describe this type of write concern as "custom" rather than "tag", so
      we changed the API of the driver accordingly.
  • RUST-435 Standardize on options exporting strategy
    • We previously exported the authentication options exposed by the driver under the namespace
      mongodb::options::auth, whereas the rest of the driver's options were exported directly from
      mongodb::options. We now export the auth options directly from mongodb::options for
      consistency.

Bug fixes

  • RUST-408 Sync API not included in the generated documentation

New Features

  • RUST-289 Implicit Sessions
  • RUST-392 Suppress "ns not found" errors
  • RUST-396 run_command should parse server errors
  • RUST-409 Add DriverInfoOptions to client metadata

Improvements

  • RUST-439 Return errors when unacknowledged write concerns are passed in

v0.10.0

05 May 20:18
ef3c50a
Compare
Choose a tag to compare

Description

The MongoDB Rust driver team is pleased to announce the first beta of the driver, v0.10.0.

Major Features

Async API

The Rust driver now provides an async API which can be used with either tokio or async-std. By default, the driver uses tokio primitives for things like TcpStreams, although the runtime still must be started before calling into the driver API. To use async-std instead of tokio, specify the following in your Cargo.toml:

[dependencies.mongodb]
version = "0.10.0"
default-features = false
features = ["async-std-runtime"]

Sync API

The sync API from previous versions of the driver has been moved to the sync module and gated under the sync feature. To enable it, specify the following in your Cargo.toml:

[dependencies.mongodb]
version = "0.10.0"
default-features = false
features = ["sync"]

The sync API wraps the async API and blocks on the results of the async API method calls. It uses async-std under the hood.

Release Notes

Bug fixes

  • RUST-397 $readPreference not being set against some topology types

New Feature

  • RUST-104 Support polling SRV records for mongos discovery
  • RUST-214 Implement non-blocking connection pooling
  • RUST-303 Implement async wire protocol
  • RUST-298 Implement non-blocking server discovery and monitoring
  • RUST-300 Implement async DNS
  • RUST-322 Add async client/database API
  • RUST-323 Add async collection API
  • RUST-324 Add async cursor API
  • RUST-215 Implement sync operations wrapping async API

Improvement

  • RUST-286 Use system DNS resolver instead of Google
  • RUST-306 Disable default features on pbkdf2 crate
  • RUST-333 Improve invalid URI option error message
  • RUST-351 Add 'allowDiskUse' option to find command
  • RUST-352 Support for 'authorizedDatabases' option

Contributors

Thanks to @judy2k, @nevi-me, and @UmerMIB for the pull requests!

v0.9.2

17 Mar 18:05
Compare
Choose a tag to compare

Description

The MongoDB Rust driver team is pleased to announce a new alpha release of the driver, v0.9.2.

Release Notes

Bug fixes

  • RUST-258 Replace connection in monitoring threads when errors occur
  • RUST-294 Remove unimplemented Display impl for WriteFailure
  • RUST-297 Properly detect cluster compatibility changes
  • RUST-266 Add sort option to FindOne
  • RUST-257 Properly fallback on secondary DNS records

Improvements

  • RUST-287 Update trust-dns dependency to eliminate conflict with actix
  • RUST-307 Unify behavior around configuration for replica set discovery
  • RUST-295 Rename ErrorKind::DnsName to ErrorKind::InvalidDnsName

Contributors

Thanks to @freakmaxi, @nevi-me, and @ttdonovan for the pull requests!

v0.9.1

29 Jan 23:38
6f8f727
Compare
Choose a tag to compare

Description

The MongoDB Rust driver team is pleased to announce a new alpha release of the driver, v0.9.1.

Release Notes

Bug fixes

  • RUST-276 Properly construct findAndModify without options
  • #115 Add default for ReplaceOptions::hint

New features

  • #109 Derive Clone for Database Options

Improvements

  • RUST-242 Update server description based on error during handshake
  • RUST-246 Batch large inserts
  • RUST-268 Improve server selection timeout error messages
  • RUST-269 Wrap I/O in buffered streams
  • RUST-270 Make command monitoring lazy
  • #110 Update trust-dns dependencies
  • #108 Fix typos in documentation

Contributors

Thanks to @brunobell, @petoknm, @nevi-me, and @andywswan for the pull requests!