[DOCS-5482] Document changes to db.currentOp() / profiler "query" field for getMore operations Created: 21/May/15  Updated: 12/Aug/15  Due: 12/Jun/15  Resolved: 09/Jun/15

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: mongodb-3.0

Type: Bug Priority: Major - P3
Reporter: David Storch Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DOCS-5605 update for 3.0.4 Closed
Documented
documents SERVER-16265 Add query details to getmore entry in... Closed
Related
related to DOCS-5483 backport to 2.6 branch Closed
Participants:
Days since reply: 8 years, 27 weeks ago

 Description   

SERVER-16265 (fixed in the 3.1 dev series and backported to 2.6 and 3.0), changed the behavior of the db.currentOp() query field for getMore operations. Currently the documentation here states:

query does not appear for op of "insert", and the query document can be empty for op types such as "getmore".

This is no longer true. The query field will now appear for a getMore against a cursor for either a find or aggregation operation. If it is an aggregation cursor, the value of the query field will be the aggregation command BSONObj:

		{
			"desc" : "conn1",
			"threadId" : "7f518f7a5700",
			"connectionId" : 1,
			"opid" : 477,
			"active" : true,
			"secs_running" : 2,
			"microsecs_running" : NumberLong(2349253),
			"op" : "getmore",
			"ns" : "test.t",
			"query" : {
				"aggregate" : "t",
				"pipeline" : [
					{
						"$match" : {
							"a" : {
								"$gt" : 1
							}
						}
					}
				],
				"cursor" : {
					"batchSize" : 0
				}
			},
....

If it's a find operation, the query field will contain the query predicate:

		{
			"desc" : "conn1",
			"threadId" : "7f518f7a5700",
			"connectionId" : 1,
			"opid" : 487,
			"active" : true,
			"secs_running" : 1,
			"microsecs_running" : NumberLong(1560034),
			"op" : "getmore",
			"ns" : "test.t",
			"query" : {
				"a" : {
					"$gt" : 1
				}
			},
....

We will need to update the documentation similarly for the profiler output documented here. Again, the query field in the system.profile collection's getMore entries will now contain either the aggregation command specification or the query predicate.



 Comments   
Comment by Githook User [ 12/Aug/15 ]

Author:

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

Message: DOCS-5482 profiler/currentOp output field query
Branch: v2.6
https://github.com/mongodb/docs/commit/00ed37eb1fd11fbf4f553ec43482a91cf6b9e656

Comment by Githook User [ 16/Jun/15 ]

Author:

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

Message: DOCS-5482 profiler/currentOp output field query
Branch: master
https://github.com/mongodb/docs/commit/3b827b27885a001881ef57c567d1e912cef59387

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