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

opcounters.command on mongos counts insert, update and delete but opcounters.command on mongod doesn't

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 6.2.0-rc0
    • None
    • None
    • Fully Compatible
    • Sharding NYC 2022-11-28

    Description

      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

              cheahuychou.mao@mongodb.com Cheahuychou Mao
              cheahuychou.mao@mongodb.com Cheahuychou Mao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: