Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Nov 12, 2021

Mend Renovate

This PR contains the following updates:

Package Type Update Change
mongodb (source) dependencies minor 2.2.2 -> 2.3.0

Release Notes

mongodb/mongo-rust-driver

v2.3.0

Compare Source

The MongoDB Rust driver team is pleased to announce the v2.3.0 release of the mongodb crate, now available for download from crates.io.

Highlighted Changes

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

MSRV Increase (RUST-1263)

The minimum supported Rust version (MSRV) for this crate is now Rust 1.53.

MongoDB 6.0 Support

This release adds support for a number of new features added in MongoDB 6.0, including change streams with document pre- and post-images and clustered collections.

MongoDB 6.0 is now GA and available for use on MongoDB Atlas, and can also be downloaded here. Release notes for MongoDB 6.0 can be found here.

Changes to mongodb::Collection::estimated_document_count implementation (RUST-1216)

When adding support for MongoDB 5.0, the driver's implementation of estimated_document_count was changed from using the count command to the aggregate command with the $collStats aggregation stage. This change first appeared in our 2.0.0-alpha.1 release. This change inadvertently broke support for using this method on views, as they do not support using $collStats.
In this release, we have reverted that change, and estimated_document_count is now once again implemented using the count command.
Please note that due to an oversight, count was omitted from the MongoDB Stable API version 1 in MongoDB server versions 5.0.0-5.0.8 and 5.1.0-5.3.1. Consequently, users of the Stable API who use estimated_document_count are recommended to either upgrade their MongoDB clusters to 5.0.9+ or 5.3.2+ (if on Atlas), or to set ClientOptions.server_api.strict to false when constructing Clients.

New ConnectionString type

RUST-1193 introduced a new public mongodb::options::ConnectionString type, which models a MongoDB connection string. This type can be used to parse a connection string and inspect and manipulate its contents, and to initialize a mongodb::options::ClientOptions, and in turn a mongodb::Client.

For example:

use mongodb::{
    Client,
    options::{ClientOptions, ConnectionString},
};

let mut conn_str = ConnectionString::parse("mongodb://localhost:27017/?appName=myApp1")?;
println!("{:?}", conn_str.app_name); // prints: Some("myApp1")
conn_str.app_name = Some("newAppName".to_string());
println!("{:?}", conn_str.app_name); // prints: Some("newAppName")

let options = ClientOptions::parse_connection_string(conn_str).await?;
let client = Client::with_options(options)?;

The differences between a ConnectionString and ClientOptions are that:

  1. ConnectionString only contains client options that are universal across MongoDB drivers and can be set via a MongoDB connection string, whereas ClientOptions also contains Rust driver-specific options,
  2. When using a mongodb+srv connection string, initializing a ClientOptions will perform SRV and TXT lookup, whereas initializing a ConnectionString will not. Note that if a ConnectionString is initialized and then used to construct a ClientOptions or a Client, SRV/TXT lookup will be performed at that time.

Included Tickets

Below are a selected list of tickets with user impact; for a full list of completed tickets see this Jira query.

Bug
  • [RUST-332] - Operations don't report errors for invalid setName in single topologies
  • [RUST-1274] - commitTransaction retry sometimes fails with InvalidOptions error
  • [RUST-1328] - ServerDescriptionChangedEvents for servers with errors always emitted even when description does not change
  • [RUST-1337] - Significant performance regression in large reads
New Feature
  • [RUST-910] - Add server connectionId to command monitoring events
  • [RUST-1070] / [RUST-1145] - Support let option for multiple CRUD commands
  • [RUST-1166] - Change streams support for user-facing PIT pre- and post-images
  • [RUST-1193] - Introduce ConnectionString type
  • [RUST-1215] - Add comment option to EstimatedDocumentCountOptions
  • [RUST-1271] - Clustered Indexes for all Collections
  • [RUST-1290] - Always report wallTime in the change stream event output
Task
  • [RUST-1263] - Bump MSRV to 1.53
  • [RUST-1311] - Bump maxWireVersion for MongoDB 6.0
Improvement
  • [RUST-488] - Allow using both async and sync API
  • [RUST-585] - Refactor Topology to use channels instead of locks
  • [RUST-803] - Use "hello" command for monitoring if supported
  • [RUST-1152] - Use hello command + OP_MSG when 'loadBalanced=True'
  • [RUST-1168] - Do not error when parsing change stream event documents
  • [RUST-1216] - Use the count command instead of collStats to implement estimated_document_count
  • [RUST-616] - Raise an error if response messageLength > ismaster.maxMessageSizeBytes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/mongodb-2.x branch 2 times, most recently from f0cbed1 to 0e36604 Compare November 20, 2021 18:56
@renovate renovate bot changed the title Update Rust crate mongodb to 2.0.2 Update Rust crate mongodb to 2.1.0 Dec 14, 2021
@renovate renovate bot force-pushed the renovate/mongodb-2.x branch from 0e36604 to 04dae1c Compare December 14, 2021 20:05
@renovate renovate bot changed the title Update Rust crate mongodb to 2.1.0 Update Rust crate mongodb to 2.2.1 Apr 24, 2022
@renovate renovate bot force-pushed the renovate/mongodb-2.x branch from 04dae1c to 9554ec4 Compare April 24, 2022 17:58
@renovate renovate bot force-pushed the renovate/mongodb-2.x branch from 9554ec4 to e8c0ae6 Compare June 18, 2022 21:17
@renovate renovate bot changed the title Update Rust crate mongodb to 2.2.1 Update Rust crate mongodb to 2.2.2 Jun 18, 2022
@renovate renovate bot force-pushed the renovate/mongodb-2.x branch from e8c0ae6 to 1111e08 Compare September 25, 2022 10:52
@renovate renovate bot changed the title Update Rust crate mongodb to 2.2.2 fix(deps): update rust crate mongodb to 2.3.0 Sep 25, 2022
@renovate renovate bot force-pushed the renovate/mongodb-2.x branch from 1111e08 to 0688f24 Compare October 1, 2022 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants