-
Type: Investigation
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
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.
- depends on
-
SERVER-71281 opcounters.command on mongos counts insert, update and delete but opcounters.command on mongod doesn't
- Closed