Skip to content

chore(deps): bump mongodb from 2.0.0-alpha.1 to 2.0.0-beta.1#4

Closed
dependabot[bot] wants to merge 1 commit intoreleasefrom
dependabot/cargo/mongodb-2.0.0-beta.1
Closed

chore(deps): bump mongodb from 2.0.0-alpha.1 to 2.0.0-beta.1#4
dependabot[bot] wants to merge 1 commit intoreleasefrom
dependabot/cargo/mongodb-2.0.0-beta.1

Conversation

@dependabot
Copy link
Copy Markdown

@dependabot dependabot Bot commented on behalf of github Jun 16, 2021

Bumps mongodb from 2.0.0-alpha.1 to 2.0.0-beta.1.

Release notes

Sourced from mongodb's releases.

v2.0.0-beta.1

Description

The MongoDB Rust driver team is pleased to announce the v2.0.0-beta.1 release of the mongodb crate. This is the second beta release in preparation for the 2.0.0 stable release, and it contains a few breaking changes, new features, API improvements, and bug fixes that were not included in the first beta. As with the previous beta, we do not intend to make any further breaking changes before v2.0.0, but we may do so in another beta if any issues arise before then.

Highlighted changes

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

Update version of bson to v2.0.0-beta.1

The exported version of bson was updated to v2.0.0-beta.1, which includes its own set of breaking changes. Check out the bson release notes for more information.

Note: chrono and uuid public API components are now gated behind the "bson/chrono-0_4" and "bson/uuid-0_8" feature flags respectively.

Replica Set Transactions (RUST-90)

This release adds driver support the for replica set transactions, which are supported in MongoDB 4.0+. Transactions require the use of a ClientSession, which was introduced in a previous release. Each operation in the transaction must pass the ClientSession into it via the _with_session suffixed version of the operation. For more information and detailed examples, see the ClientSession documentation.

use mongodb::options::{Acknowledgment, ReadConcern, TransactionOptions};
use mongodb::{
    bson::{doc, Document},
    options::WriteConcern,
};
let mut session = client.start_session(None).await?;
let txn_options = TransactionOptions::builder()
.write_concern(WriteConcern::builder().w(Acknowledgment::Majority).build())
.read_concern(ReadConcern::majority())
.build();
session.start_transaction(txn_options).await?;
collection
.insert_one_with_session(doc! { "x": 1 }, None, &mut session)
.await?;
collection
.delete_one_with_session(doc! { "x": 2 }, None, &mut session)
.await?;
session.commit_transaction().await?;

The "snapshot" read concern level was also introduced as part of this feature.

Reduce the default max_pool_size to 10 (RUST-823)

In prior versions of the driver, the default max_pool_size was 100, but this is likely far too high to be a default. For some background on the motivation, see here and here. Note that this is also in line with the defaults for r2d2 and bb8.

... (truncated)

Commits
  • 6cb18e1 release v2.0.0-beta.1
  • 8092036 RUST-813 Add documentation examples for transactions (#349)
  • e7d7573 minor: Update to semver 1.0.0 (#348)
  • b870bfd RUST-830 Consolidate error label storage to Error::labels (#350)
  • 906efae RUST-811 Introduce feature flags for chrono and uuid interop (#347)
  • 7266083 RUST-824 Add Snapshot variant to ReadConcernLevel (#345)
  • 1a096bd RUST-823 Reduce default max_pool_size to 10 (#346)
  • 3569cc2 RUST-768 Test that versioned API options are passed to transaction-continuing...
  • 372dc99 minor: fix clippy (#344)
  • b126d24 RUST-736 Update README examples to reflect usage of 2.0 API (#343)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [mongodb](https://github.com/mongodb/mongo-rust-driver) from 2.0.0-alpha.1 to 2.0.0-beta.1.
- [Release notes](https://github.com/mongodb/mongo-rust-driver/releases)
- [Commits](mongodb/mongo-rust-driver@v2.0.0-alpha.1...v2.0.0-beta.1)

---
updated-dependencies:
- dependency-name: mongodb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github
Copy link
Copy Markdown
Author

dependabot Bot commented on behalf of github Jun 16, 2021

The following labels could not be found: domain: deps.

@dependabot @github
Copy link
Copy Markdown
Author

dependabot Bot commented on behalf of github Jun 28, 2021

Superseded by #12.

@dependabot dependabot Bot closed this Jun 28, 2021
@dependabot dependabot Bot deleted the dependabot/cargo/mongodb-2.0.0-beta.1 branch June 28, 2021 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

0 participants