[SERVER-5339] make currentOp more informative Created: 19/Mar/12  Updated: 15/Aug/12  Resolved: 20/Mar/12

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

Type: Improvement Priority: Major - P3
Reporter: Greg Studer Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Would be great if in currentOp we could cross-reference against the logs (include the connection # reported by the thread in mongod/mongos logs) as well as always reporting the query (not just when active).

Final wish - allow users to pass in descriptive strings in queries which would be reported as "customDesc" - this way we could explicitly track particular queries as they were being processed.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 20/Mar/12 ]

there is another case to show query better

Comment by Greg Studer [ 19/Mar/12 ]

Yah, works-as-designed except for always reporting the query.

Comment by Scott Hernandez (Inactive) [ 19/Mar/12 ]

Greg, see $comment : http://www.mongodb.org/display/DOCS/Advanced%20queries#AdvancedQueries-%24comment

I'm pretty sure the connectionId is what gets printed in logs in brackets:

	"inprog" : [
		{
			"opid" : 2161048,
			"active" : true,
			"lockType" : "read",
			"waitingForLock" : false,
			"secs_running" : 2,
			"op" : "query",
			"ns" : "test.people",
			"query" : {
				"$where" : "sleep(10000)"
			},
			"client" : "127.0.0.1:56365",
			"desc" : "conn",
			"threadId" : "0x7f0726009700",
			"connectionId" : 1,
			"numYields" : 0
		}
	]

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