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

CurOp should record number of upserts performed

    XMLWordPrintableJSON

Details

    • Minor Change
    • Query 2020-09-07, Query 2020-09-21

    Description

      Currently, update operations set a boolean flag in CurOp when they produce an upsert. This is sufficient on mongoD, since we log and profile each of the individual operations from the update command separately, and so there can only be at most one upsert per op.

      However, we are now logging slow ops on mongoS as well (SERVER-14900), which dispatches writes in batches and reports the aggregated results; there may therefore be multiple upserts per op. Setting the upserted boolean results in a logline which reads upsert:1, which may be highly misleading if more than a single upsert was performed.

      We should replace the upsert bool in CurOp with an integer nUpserted and log the actual number of documents upserted, on both mongoD and mongoS.

      Attachments

        Activity

          People

            nikita.lapkov@mongodb.com Nikita Lapkov (Inactive)
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: