This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.6.0
->2.7.0
Release Notes
mongodb/mongo-rust-driver (mongodb)
v2.7.0
Compare Source
The MongoDB Rust driver team is pleased to announce the v2.7.0 release of the
mongodb
crate, now available for download from crates.io.Highlighted Changes
Serialization Behavior Change
When serializing values via serde, the serializer can indicate whether or not the target format is human-readable, allowing types to change behavior based on that. The Rust driver had inadvertently been serializing values given to
find_one_and_replace
andreplace_one
as human-readible when all other methods serialize as non-human-readible; this bug is fixed in 2.7.0, with those methods also serializing as non-human-readible.However, it is potentially possible (if unlikely) that user code may rely on this bug. If your code does rely on human-readable serialization, you can specify that via the new
human_readable_serialization
field inCollectionOptions
.run_cursor_command
The Rust driver provides the
run_command
method as a way for users to directly send bson commands to the server; this is particularly useful when the driver does not yet have support for a newly-added server command. However, using this with commands that return a cursor requires re-implementing the logic for cursor iteration, which can be tedious and error-prone. The newrun_cursor_command
method avoids those problems, directly returning aCursor
using the same iteration logic as other methods.SDAM Logging
The Rust driver will now log SDAM events when using the
tracing-unstable
feature.Client Management
The
Client
type now provides three additional ways to shape behavior to fit your workload:ClientOptions.max_connecting
lets you specify how many "in flight" connections can be established in parallel. This was previously fixed at 2 and defaults to the same value.Client::warm_connection_pool
will create new connections to bring the connection pool up tomin_pool_size
, which can provide more predictable performance in some circumstances.Client::shutdown
will cleanly stop background tasks and wait for outstanding handles to be dropped. This is particularly useful when using event handlers that reference external resources, as otherwise those handlers may be invoked in a background task even after theClient
has been dropped.Included Changes
Below are a selected list of changes with user impact; for a full list of changes see this GitHub query.
New Features
Improvements
Bugfixes
v2.6.1
Compare Source
The MongoDB Rust driver team is pleased to announce the v2.6.1 release of the
mongodb
crate, now available for download from crates.io. This release removes a potential panic from theSessionCursor::with_type
method.Included Changes
Bugfixes
SessionCursor::with_type
is called (#928) (thank you @mlokr for this fix!)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.
This PR has been generated by Mend Renovate. View repository job log here.