Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
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.
Attachments
Issue Links
- documents
-
SERVER-16265 Add query details to getmore entry in profiler and db.currentOp()
-
- Closed
-
- is depended on by
-
DOCS-5605 update for 3.0.4
-
- Closed
-
- related to
-
DOCS-5483 backport to 2.6 branch
-
- Closed
-