fix: Preserve first writeConcernError in unordered bulk write

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Unknown
    • 2.8.1
    • Affects Version/s: None
    • Component/s: Bulk API
    • None
    • Go Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      An unordered collection.BulkWrite that spans multiple batches can silently return success when an earlier batch's write-concern failure is overwritten by a later successful batch's nil WriteConcernError.

      This is collection bulk-write, not client bulk-write. In triage, we assumed client bulk-write which prohibits propagating batch errors. Collection bulk-write does not have this prohibition. This is a legitimate bug.

      Definition of done

      The last non-nil write concern error should be propagated on BulkWriteException.

            Assignee:
            Preston Vasquez
            Reporter:
            Matt Dale
            Qingyang Hu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: