[COMPASS-6295] Investigate changes in SERVER-71281: opcounters.command on mongos counts insert, update and delete but opcounters.command on mongod doesn't Created: 11/Nov/22  Updated: 02/Dec/22  Resolved: 02/Dec/22

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Investigation Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-71281 opcounters.command on mongos counts i... Closed
Documentation Changes: 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.



 Comments   
Comment by Anna Henningsen [ 02/Dec/22 ]

Nothing to do here. This does affect Compass, but only in its capacity as a bug fix. I don’t think we need to adjust Compass to account for the buggy behavior on previous versions.

Generated at Wed Feb 07 22:42:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.