Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Provide performance flag for MongoDB batch method to allow unordered operations #206

Open
DRK3 opened this issue Dec 7, 2021 · 1 comment

Comments

@DRK3
Copy link
Contributor

DRK3 commented Dec 7, 2021

MongoDB allows a BulkWrite call to be ordered or unordered. Right now all calls to BulkWrite are always ordered. For callers that don't need this, allowing them to specify that the call can be unordered can allow MongoDB to process the operations faster.

@DRK3
Copy link
Contributor Author

DRK3 commented Feb 8, 2022

For Amazon DocumentDB, doing a large number of upsert operations in a BulkWrite slow is very slow. They suggested that that we could try breaking up large upsert batch operations into multiple concurrent requests to realize better overall performance. This may be worth trying, but this type of strategy is only possible if we have a way to specify that operations are unordered in the first place.

Original message from DocumentDB support:

if cluster resources are not fully utilized and there are no side effects of concurrent updates, we recommend redistributing your batches across a larger number of concurrent client threads.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant