Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-6295

Investigate changes in SERVER-71281: opcounters.command on mongos counts insert, update and delete but opcounters.command on mongod doesn't

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Not Needed

      Original Downstream Change Summary

      Prior to this ticket, "opcounters.command" on mongos used to also count insert, update and delete commands, which doesn't match the documentation for "opcounters". That is, the statement below is only true for mongod.

      > opcounters.command counts all commands except the write commands: insert, update, and delete".
      https://www.mongodb.com/docs/manual/reference/command/serverStatus/#mongodb-serverstatus-serverstatus.opcounters.command

      The ticket makes "opcounters.command" on mongos stop counting insert, update and delete commands.

      Description of Linked Ticket

      The serverStatus "opcounters" section contains the counts for for "insert", "update", "delete", "query" (find), "getmore" and "command" (all other operations). The documentation specifically notes that:

      opcounters.command counts all commands except the write commands: insert, update, and delete

      It turns out this statement is only true for mongod. Unlike mongod which marks insert, update and delete as shouldAffectCommandCounter(), mongos doesn't do that for ClusterWriteCmd.

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

              Created:
              Updated:
              Resolved: