[SERVER-2663] Apply query expression to currentOp WAS: db.currentOp() should return multiple documents, so various queries can be performed on it Created: 02/Mar/11  Updated: 12/Jul/16  Resolved: 07/Nov/11

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

Type: Improvement Priority: Major - P3
Reporter: Kenny Gorman Assignee: Brandon Diamond
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Participants:

 Description   

Alter the underlaying query for db.currentOp() to return multiple documents, one per session. Thus one can query for waiting sessions, sessions from a particular host, sessions just doing update, etc using the native query language vs bringing back a single doc and processing it on the client side. This will allow the usage of a common set of queries for these items.



 Comments   
Comment by auto [ 07/Nov/11 ]

Author:

{u'login': u'', u'name': u'Brandon Diamond', u'email': u'brandon@10gen.com'}

Message: SERVER-2663: Added testcase
Branch: master
https://github.com/mongodb/mongo/commit/c5b1fd158175de59c5b454312328a9dfb2aefe5a

Comment by auto [ 07/Nov/11 ]

Author:

{u'login': u'', u'name': u'Brandon Diamond', u'email': u'brandon@10gen.com'}

Message: SERVER-2663: Query inprog array (currentOp)
Branch: master
https://github.com/mongodb/mongo/commit/3c2cfee68f38a09f798269172e5799cdb72dd185

Comment by Eliot Horowitz (Inactive) [ 05/Apr/11 ]

$all is a special $ operator (why the $ is there) so its fine to be at top level

Comment by Mathias Stearn [ 04/Apr/11 ]

should probably be {query: {op: 'query'}} since we already use that object for non-query arguments ($all).

Comment by Kenny Gorman [ 04/Apr/11 ]

yeah, exactly, FWIW here is an example:

https://gist.github.com/902527

Comment by Eliot Horowitz (Inactive) [ 04/Apr/11 ]

should be something like

db.currentOp(

{ op : "query" }

)

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