|
Re-opening this ticket pending some incomplete work. In SERVER-19566, we changed the "query" field of the profiler entry to look like the find command parameters object, regardless of whether the query was delivered as a legacy OP_QUERY or as a find command. We should consider doing similar work for currentOp().
Currently, the "query" field in currentOp will look different depending on the readMode. Consider the query db.foo.find({a:1}, {_id:1}).limit(5).skip(2).batchSize(1) issued from the shell. With --readMode compatibility, the currentOp entry will look like this:
"op" : "query",
|
"ns" : "test.foo",
|
"query" : {
|
"a" : 1
|
},
|
With --readMode commands, on the other hand, it will look like this:
"op" : "query",
|
"ns" : "test.foo",
|
"query" : {
|
"find" : "foo",
|
"filter" : {
|
"a" : 1
|
},
|
"skip" : 2,
|
"batchSize" : 1,
|
"limit" : 5,
|
"singleBatch" : false,
|
"projection" : {
|
"_id" : 1
|
}
|
},
|
It would be nice to "upconvert" the currentOp entry for a legacy OP_QUERY in order to look the same as a find command.
|