Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-975

MongoError: Invalid Operation, No operations in bulk

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.22
    • Component/s: MongoDB 3.4
    • Labels:
    • 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).

      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 */ }

      )

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            efkan efkan turen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: