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

nMatched in bulkWrite response should not count upserted documents

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Repl 2023-12-11

      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.

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

              Created:
              Updated:
              Resolved: