Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13864

Investigate changes in SERVER-34118: CurOp should record number of upserts performed

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.7.0
    • Component/s: manual, Server
    • Labels:
      None

      Description

      Description

      Downstream Change Summary

      In the explain output wouldInsert boolean flag is replaced with nWouldUpsert counter indicating number of documents upserted during update. This counter can be only 1 or 0.
      In mongod and mongos logs upsert boolean flag is replaced with nUpserted counter indicating number of documents upserted during update. On mongod this counter is always 1 or 0 (because each individual update is logged separately). On mongos this counter can be larger than 1 if update is batched.

      Description of Linked Ticket

      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.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              backlog-server-pm Backlog - DB Eng Program Management Team
              Participants:
              Last commenter:
              Backlog - DB Eng Program Management Team
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Days since reply:
                6 weeks, 4 days ago
                Date of 1st Reply: