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

BulkWriteReplyItem should only expose upsertedId rather than using write_ops::Upserted

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • None
    • None
    • Replication
    • Fully Compatible
    • Repl 2023-09-04

    Description

      Right now BulkWriteReplyItem uses the write_ops::Upserted type to expose information about upserts. 

      However, the Upserted type stores both an index as well as an _id. This makes sense in the context of the update command, since the Upserted type there is a top-level field on the command response and users need a way to map the upsert info back to the input operations. 

      But in bulkWrite, we are returning this info in the per-statement responses, so it is redundant to include the index. We should just expose the upsertedId instead. 

      Attachments

        Activity

          People

            frederic.vitzikam@mongodb.com Frederic Vitzikam
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: