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

Executing bulk operations overwrites write concern parameter

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.2.12
    • Affects Version/s: 2.2.2
    • Component/s: None

      The bulk operation API allows passing a write concern object in two places: when the op is initialized, and when it's executed. If the user passes write concerns at init but not execution, and if the `execute` method is called in the promise form, the write concern object will be overwritten with `undefined`: https://github.com/mongodb/node-mongodb-native/blob/2.2/lib/bulk/unordered.js#L486-L493

      Either write concern shouldn't be specified at init time, or a check should be made here to ensure `_writeConcern` isn't undefined.

            Assignee:
            Unassigned Unassigned
            Reporter:
            wgreenberg Will Greenberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: