[SERVER-18482] db.currentOp(True) does not return client information on idle connections Created: 14/May/15 Updated: 25/Jan/17 Resolved: 22/May/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics |
| Affects Version/s: | 3.0.2 |
| Fix Version/s: | 3.1.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Rod Adams | Assignee: | Andy Schwerin |
| Resolution: | Done | Votes: | 0 |
| Labels: | ET, curop, currentop | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
Simple Repro:
The entries for the four idle shells will look like:
Perform the same steps in 2.6.9, and you get back something akin to:
Having the client information available, even for idle connections, is quite useful in some diagnostics processes, including tracking all of the applications which are connected at any given time. |
| Comments |
| Comment by J Rassi [ 11/Dec/15 ] | ||||||||||||||
|
I'm tentatively denying the v3.0 backport request for this ticket, as the risk of introducing further regressions in the affected code seems to outweigh the diagnosability benefit that the fix would yield. This bug fix would require a separate implementation for the v3.0 branch (and would depend on a separate backport for As a workaround, 3.0 users who are unable to upgrade to 3.2 should consult the mongod log file in order to determine what remote address is associated with a given user connection. For example, supposing that my currentOp output looks as follows:
I can use the following grep invocation on the mongod log file to determine the remote address of the client where connectionId is 4:
These "connection accepted" messages are logged at log level 0 (the default log level). | ||||||||||||||
| Comment by Ambikesh Kumar Shukla [ 09/Sep/15 ] | ||||||||||||||
|
when I ran db.currentOp(true) on MongoShell(2.6.9) return multiple operation Id as well that is not present in the new output (Mongo shell (3.1.4). | ||||||||||||||
| Comment by Ambikesh Kumar Shukla [ 07/Sep/15 ] | ||||||||||||||
|
I have ran db.currentOp(true) from Mongo Shell (2.6.9) this gives more information about the client id,connection id and operation id. | ||||||||||||||
| Comment by Rod Adams [ 22/May/15 ] | ||||||||||||||
|
I believe that covers the issues at hand, yes. Note: Added backport request for 3.0. | ||||||||||||||
| Comment by Andy Schwerin [ 22/May/15 ] | ||||||||||||||
|
rod.adams, I've fixed this at master by adding back the "client" field, only. Is that sufficient? New output:
| ||||||||||||||
| Comment by Githook User [ 22/May/15 ] | ||||||||||||||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: |