Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No bulk write function #890

Closed
ktjd123 opened this issue Jun 8, 2023 · 6 comments
Closed

No bulk write function #890

ktjd123 opened this issue Jun 8, 2023 · 6 comments
Assignees

Comments

@ktjd123
Copy link

ktjd123 commented Jun 8, 2023

Hi,

Is there planned release date for bulkWrite function expose?

Saw it will be exposed at end of 2022 but seems no update.

Thank you.

@isabelatkinson
Copy link
Contributor

Hi @ktjd123, apologies for the delay on the bulk write feature. We are currently working on designing/implementing an improved bulk write API for all of the MongoDB drivers, so we are waiting until that work is done to add bulk write to the Rust driver. We do not currently have a time frame for when that will be released, but you can follow RUST-1282 for updates.

@danielsan
Copy link

I should have researched this before migrating a nodejs app to Rust.
The app performs several updateOne operations per bulk request and doing that one by one over the wire is much slower.

How can we help this feature get prioritized/done?

@isabelatkinson
Copy link
Contributor

@danielsan the bulk write feature is nearing completion and should be released within the coming weeks. Please note that the actual server command that it uses is introduced in server version 8.0, which is only available as a release candidate right now.

In the meantime, you can use the run_command method to send an update operation with multiple updates in the updates array.

@isabelatkinson
Copy link
Contributor

Bulk write will be released in the upcoming 3.0.0-beta release, going to close this out.

@ShaunSHamilton
Copy link

@isabelatkinson

Please note that the actual server command that it uses is introduced in server version 8.0, which is only available as a release candidate right now.

Would you mind clarifying if v8 is needed for bulk writes to the same collection as well:

Starting in MongoDB 8.0, you can use the new bulkWrite command to perform many insert, update, and delete operations on multiple collections in one request. The existing db.collection.bulkWrite() method only allows you to modify one collection in one request.

Specifically, I see the mongodb docs.rs only mention a requirement of 3.6+.

@isabelatkinson
Copy link
Contributor

Hey @ShaunSHamilton, 8.0 is required for any kind of bulk write using the bulk_write method, regardless of how many namespaces are being written to. The Rust driver does not implement the db.collection.bulkWrite() method that the docs you quoted refer to.

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

No branches or pull requests

4 participants