[SERVER-28649] Create a currentRouterOps command in the mongos. Created: 06/Apr/17  Updated: 06/Dec/22  Resolved: 14/Mar/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Rod Adams Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-18094 currentOp on a mongoS should also sho... Closed
Related
related to SERVER-32103 CTRL-C in mongo shell does not termin... Backlog
Assigned Teams:
Query
Participants:

 Description   

In many cases when diagnosing the behavior of a sharded cluster, there has been a need to better understand the current behavior of what the mongos is doing. We have often been able to work around this, but it would be much more direct and clear if we could just directly query the current state of routing operations. To this end, I suggest the creation of a currentRouterOps command (name not important). When called against a mongos, it would generate that would include:

For each inbound request from clients:

  • client host:port
  • what the operation is
  • time of arrival
  • if there's any classification the mongos does of ops (scatter/gather, directly steered, etc), include that
  • which backend(s) (shard mongod or config server) it determined to route the op to
    • for each backend, what role it plays (i.e. in a scatter/gather, who are the scatterers vs gatherer)
    • which connection(s) are being used for that backend
    • current believed status of that op on the backend.

While this would be good for future versions, please consider adding it to all non-EOL versions of mongos.



 Comments   
Comment by David Storch [ 14/Mar/18 ]

This feature request should be satisfied by the work in progress under SERVER-18094, so I am closing this ticket as a duplicate. SERVER-18094 will add a localOps flag to the $currentOp command. A client will be able to issue the following to a mongos in order to see information about the operations that mongos is currently executing:

adminDb.aggregate([{$currentOp: {localOps: true}}])

Generated at Thu Feb 08 04:18:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.