Executing bulk operations overwrites write concern parameter

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.2.12
    • Affects Version/s: 2.2.2
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Will Greenberg
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: