Running BulkOp.execute twice does not error

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.0.0
    • Affects Version/s: 4.0.0
    • Component/s: Shell
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Per the drivers spec: https://github.com/mongodb/specifications/blob/master/source/driver-bulk-update.rst#on-bulk-execution

      "A descriptive error should be raised if execute is called more than once."

       

      To recreate:

      > const bulk = await db('test').collection('coll').initializeOrderedBulkOp()
      > bulk.insert({})
      > await bulk.execute()
      --> returns result object
      > await bulk.execute()
      --> returns the same bulk object instead of throwing an error. It does not appear like the ops are executed twice

      In 3.6.3 an error is thrown.

              Assignee:
              Matt Broadstone
              Reporter:
              Anna Herlihy (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: