Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-75946

Make fixes to update response in bulkWrite

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Replication
    • Fully Compatible
    • Repl 2023-05-01

      There are multiple small changes that need to be made to the update response to make it more correct.

       

      1. Upserted response field in bulkWrite currently uses write_ops::Upserted like Update does. We should use IdlAnyTypeOwned like findAndModify does since we do not need to capture the index field.
      2. We currently only set nModified for an update response, we should set the n field also
      3. When an update fails, we should still set nModified for it in the response.

       

      As part of this ticket it would also be nice to do some further cleanup by replacing the callback functions with passing around the BulkWriteReplies object and calling the functions directly

       

      This will involve updating all relevant tests

            Assignee:
            frederic.vitzikam@mongodb.com Frederic Vitzikam
            Reporter:
            sean.zimmerman@mongodb.com Sean Zimmerman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: