nMatched in bulkWrite response should not count upserted documents

XMLWordPrintableJSON

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

      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
            Reporter:
            Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: