[SERVER-19318] currentOp command should return cursor Created: 07/Jul/15  Updated: 25/Jan/19  Resolved: 02/Aug/17

Status: Closed
Project: Core Server
Component/s: Admin, Diagnostics, Logging
Affects Version/s: None
Fix Version/s: 3.5.10

Type: Bug Priority: Major - P3
Reporter: Charlie Page Assignee: Bernard Gorman
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 SERVER-8259 if db.currentOp(true) exceeds 16MB, i... Closed
Documented
is documented by DOCS-10527 Docs for SERVER-19318: currentOp comm... Closed
Duplicate
is duplicated by SERVER-8136 allow db.currentOp() from mongos to s... Closed
Related
related to SERVER-19317 Run all tests against large sharded c... Closed
related to SERVER-29546 Add hostname to standard $currentOp o... Closed
is related to SERVER-23260 Report original query with getMore in... Closed
is related to SERVER-23267 Add test coverage for inclusion of na... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2017-04-17, Query 2017-05-08, Query 2017-05-29, Query 2017-06-19, Query 2017-07-10
Participants:
Linked BF Score: 0

 Description   

mongos> db.currentOp(true)
2015-07-07T11:26:00.759-0700 error: {
	"$err" : "BufBuilder attempted to grow() to 134217728 bytes, past the 64MB limit.",
	"code" : 13548
} at src/mongo/shell/query.js:131

There are 225 connections to the mongos, with 40 shards, each
with a 5-member replica set. lsof shows ~4600 open connections to the mongos process.

Trying to grow a buffer to 134 MB for the output of 4600 connections seems a little large (~32 kB/connection entry), but making the command scale is the goal.

Introducing a cursor to the command (and others like it) would allow it to work on arbitrarily sized clusters.



 Comments   
Comment by Githook User [ 07/Jul/17 ]

Author:

{u'username': u'gormanb', u'name': u'Bernard Gorman', u'email': u'bernard.gorman@gmail.com'}

Message: SERVER-19318 Reimplement the currentOp command as a $currentOp aggregation
Branch: master
https://github.com/mongodb/mongo/commit/2b198988a626df6f36c9e606b08b266c462cceb4

Comment by Githook User [ 07/Jul/17 ]

Author:

{u'username': u'gormanb', u'name': u'Bernard Gorman', u'email': u'bernard.gorman@gmail.com'}

Message: SERVER-19318 Add getMore authentication for collectionless aggregation namespaces
Branch: master
https://github.com/mongodb/mongo/commit/286717ae5aa0c5a83ea8bf49b75158ae4af0b857

Comment by Githook User [ 07/Jul/17 ]

Author:

{u'username': u'gormanb', u'name': u'Bernard Gorman', u'email': u'bernard.gorman@gmail.com'}

Message: SERVER-19318 Avoid taking any locks for collectionless aggregations without foreign namespaces
Branch: master
https://github.com/mongodb/mongo/commit/d9e367b1ab30d9f4c61a845aac70af0aa607c26b

Comment by Githook User [ 17/Jun/17 ]

Author:

{u'username': u'gormanb', u'name': u'Bernard Gorman', u'email': u'bernard.gorman@gmail.com'}

Message: SERVER-19318 Do not validate $facet subpipelines against top-level pipeline namespace
Branch: master
https://github.com/mongodb/mongo/commit/a5f0a84c79b6ce41fef33da920c62be0ecc8f07b

Comment by Githook User [ 16/Jun/17 ]

Author:

{u'username': u'gormanb', u'name': u'Bernard Gorman', u'email': u'bernard.gorman@gmail.com'}

Message: SERVER-19318 Allow $currentOp aggregations to be run on mongoS
Branch: master
https://github.com/mongodb/mongo/commit/69fd148aafff5bc9c33596b75560f05a6a260f7a

Comment by Githook User [ 07/Jun/17 ]

Author:

{u'username': u'gormanb', u'name': u'Bernard Gorman', u'email': u'bernard.gorman@gmail.com'}

Message: SERVER-19318 Tag aggregation_currentop.js with requires_persistence
Branch: master
https://github.com/mongodb/mongo/commit/8df6a4a4f4494d5371ccafcc3571a296b5fd384d

Comment by Githook User [ 26/May/17 ]

Author:

{u'username': u'gormanb', u'name': u'Bernard Gorman', u'email': u'bernard.gorman@gmail.com'}

Message: SERVER-19318 Add $currentOp aggregation stage for mongoD
Branch: master
https://github.com/mongodb/mongo/commit/58486605c09672b3bfce8608dca403a145413bba

Comment by Daniel Pasette (Inactive) [ 18/Jul/16 ]

I like scott's idea as a short-term stop gap.

Comment by Scott Hernandez (Inactive) [ 18/Jul/16 ]

Now the more stuff is in currentOp, like the getmore predicates, it should be much easier to hit the document limit when working with a single server.

Another solution to the problem, short of returning a cursor, is just to stop adding curOp entries before the size is met, and to indicate there are missing entries.

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