-
Notifications
You must be signed in to change notification settings - Fork 98
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
bulkWrite works only for the last item of bulkOperations #199
Comments
There is currently no unit test which tests a bulk write with multiple replace operations. Therefore I have created a quick test to verify: This is the only test that fails. |
Hello, @leolux , Thanks for submitting, |
I can't get the first two lines of mongodb-driver-async t to work:
Both lines are marked as deprecated and the error is: I tried to follow this guide: https://mongodb.github.io/mongo-java-driver/3.10/driver-async/getting-started/quick-start/#connect-to-a-standalone-mongodb-instance Maybe someone else has more luck testing bulk replaces with mongodb-driver-async. |
We're not sure this test is surfacing a bug. The test inserts a single document and then attempted to do 2 bulk operations, one of the inserted doc and another on a doc that doesn't exist, which is why we only get back a modifiedCount of 1 |
The following test shows bulk operations 'working'
|
@leolux Can you confirm that this works for you? |
Thank you for improving the testcase. I like it to setup a similar testcase using the |
The method bulkWrite() accepts a list of BulkOperations. My finding is that only the last item of the list gets actually written to mongoDB and everything else is kind of ignored.
The callback of bulkWrite() returns successful without any error which is a bit strange.
Note: I use mongoDB v3.4.7
The text was updated successfully, but these errors were encountered: