-
Notifications
You must be signed in to change notification settings - Fork 256
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
Bulk API doesnt break up actions #265
Comments
Example Code I have: bulk.find({ memberId: memberId }).updateOne({ $set: updateData }); memberId is a number and updateData is just an json Object of field/values. I may have 5-10k of these in a single batch that gets executed. In my previous version of MongoJs this works just fine. |
Had the same problems with exceeded batch size and circumvented this by implementing a module splitting my data into chunks
We're currently working on a new major mongojs release based on mongodb-native (instead of mongodb-core) driver to get these problems fixed. For more detail see #256 |
Maybe it is best I just don't update to a 1.x version. I am runing .18.1 now and it uses the native driver which seems to not do the 1000 bulk issue |
Does 0.18.1 support mongo 3? |
Should be fixed in version 2.0 (released just some seconds ago) |
Just tested this out with mongojs 2.0.0 - works like a charm. The underlying driver breaks up bulks 👍 |
2.0 breaks for me too. It now throws different issues in other areas: Maximum call stack exceeded. /express/node_modules/mongojs/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:247 |
Did you test with my wrapper or without. The wrapper will not work in 2.0 - could insert an array of 10000 items without bulk exceeded errors or the like |
I am using your MongoJS wrapper - did not change any code just updated the module to mongojs 2.0. I never got to the point of doing the insertions.. I got the call stack exceeded before that. |
Related to #270 |
Fixed in newest mongodb-core release. You'll need to |
Got the same error in the newest version of mongojs. MongoJS version: "2.3.0" Error:
Code example:
|
@lionvs there is still a bug in bulk API. Thanks for your code - helped me reproduce the problem! |
Any update on it ? |
I am trying to upgrade to the latest MongoJS as well as Mongo 3.0. When I run code that I have had in production for 2yrs I get an error on doing bulk updates.
{ name: 'MongoError',
message: 'exceeded maximum write batch size of 1000',
ok: 0,
code: 16,
errmsg: 'exceeded maximum write batch size of 1000' }
Shouldn't mongojs be managing breaking that up or the underlying driver at least?
The text was updated successfully, but these errors were encountered: