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

Always store BulkWriteReplyItems for WriteOps, even when they fail

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Replication
    • Fully Compatible
    • Repl 2024-02-05

      Currently, in the case of a failed write op, we do not store the BulkWriteReplyItem, but store a subset of the information from the reply item in the form of a WriteError.
      We then later turn it back into a BulkWriteReplyItem as we build the response items.

      In cases where a write succeeds on some shards but fails on others, this causes us to lose information from the shards where the write did succeed and leads to incorrect results.
      We should update our logic so that for bulkWrite, the final result (either success or failure) is always stored as a BulkWriteReplyItem, and ensure that item is a merged version of any success replies and error replies for the given write.

            sean.zimmerman@mongodb.com Sean Zimmerman
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            0 Vote for this issue
            2 Start watching this issue