-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
Documentation Request Summary:
No documentation summary in engineering ticket
Scope of changes:
Add 'localOps' parameter to $currentOp
note Currently, we don't drill down int o clientMetadata output field which has info on the connected mongos.
Impact to other docs outside of this product:
MVP:
Resources:
Engineering Ticket Description:
When there is a long running operation in a sharded cluster, if you run currentOp() on the mongoS, you can see the shard operations:
{ "desc" : "conn6", "threadId" : "0x7ff5c34124b0", "connectionId" : 6, "opid" : "shard01:26", "active" : true, "secs_running" : 6, "microsecs_running" : NumberLong(6237133), "op" : "query", "ns" : "test", "query" : { "$eval" : function () { for(i=0; i<5; i++) { db.bar.findOne(); sleep(10000)}} }, "client_s" : "10.8.1.231:52889", "numYields" : 0, "locks" : { "Global" : "W", "MMAPV1Journal" : "w" }, "waitingForLock" : false, "lockStats" : { "Global" : { "acquireCount" : { "r" : NumberLong(2), "W" : NumberLong(1) } }, "MMAPV1Journal" : { "acquireCount" : { "w" : NumberLong(1) } }, "Database" : { "acquireCount" : { "r" : NumberLong(2) } }, "Collection" : { "acquireCount" : { "R" : NumberLong(2) } } } },
While it's possible to tell which mongoS it came from, it's not possible to trace it back further unless you have verbose logging on the mongoS. It would be nice to be able to find the source of the long running operation directly from currentOp output.
If you are running a query, you could use $comment to annotate the query. However for other operations (writes, commands, internal things like chunk migrations, etc) there is no such feature.
- documents
-
SERVER-18094 currentOp on a mongoS should also show current mongoS operations
- Closed
- related to
-
DOCS-11524 Docs for SERVER-34017: Add command line / config file parameters for slowms and sampleRate on mongos
- Closed