-
Type:
Task
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.2.22
-
Component/s: MongoDB 3.4
-
Environment:Ubuntu 16.04 x64, Dual-Core E5700, 4 GB DDR, Using via Mongoose `Model.collection.insertMany(docs, opts, callback)` notation, Redis and MongoDB are on the same machine and are share the system resources (20% of the RAM is used by Redis).
-
Empty show more show less
When performing insertMany with 1.000.000 documents, by dividing in 1000s, the error below occurs:
MongoError: Invalid Operation, No operations in bulk
However, although I encountered with this error, the operation is completed successfully.
I can see the all of 1.000.000 documents on the MongoDB.
My code:
let insertOptions =
{ ordered: false, forceServerObjectId: true }Model.collection.insertMany(docs, insertOptions, (err, res) =>
{ /* I get the error overhere */ })