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

Always store BulkWriteReplyItems for WriteOps, even when they fail

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Replication
    • Repl 2024-02-05

    Description

      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.

      Attachments

        Activity

          People

            vishnu.kaushik@mongodb.com Vishnu Kaushik
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: