Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3218

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

    XMLWordPrintableJSON

Details

    • Investigation
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Not Needed

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: