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

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Sharding NYC 2022-11-28
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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:
              Cheahuychou Mao
              Reporter:
              Cheahuychou Mao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: