[DOCS-11566] Docs for SERVER-18094: currentOp on a mongoS should also show current mongoS operations Created: 09/Apr/18  Updated: 29/Oct/23  Resolved: 09/Jun/18

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: curop, currentop
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-18094 currentOp on a mongoS should also sho... Closed
Related
related to DOCS-11524 Docs for SERVER-34017: Add command li... Closed
Participants:
Days since reply: 5 years, 35 weeks, 5 days ago
Epic Link: DOCS: 4.0 Server

 Description   

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.



 Comments   
Comment by Githook User [ 08/Jun/18 ]

Author:

{'username': 'kay-kim', 'name': 'kay', 'email': 'kay.kim@10gen.com'}

Message: DOCS-11566: currentOp localOps
Branch: master
https://github.com/mongodb/docs/commit/4324a88bbc364711a725f1805def29e61502d2d5

Generated at Thu Feb 08 08:03:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.