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

nMatched in bulkWrite response should not count upserted documents

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • Repl 2023-12-11

    Description

      In SERVER-80293 we added a top-level nMatched field for the bulkWrite command response. Currently this just sums the n value across all individual updates. However, that leads to us also counting upserted documents toward nMatched, because n is 1 for an upsert. We should fix this so that nMatched only counts non-upserts.

      Attachments

        Activity

          People

            sean.zimmerman@mongodb.com Sean Zimmerman
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: