[SERVER-26109] Allow db.currentOp() to provide original client of a query behind mongos Created: 14/Sep/16 Updated: 03/Apr/19 Resolved: 12/Oct/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.2.9 |
| Fix Version/s: | 3.6.0-rc1 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Tudor Aursulesei | Assignee: | Mark Benvenuto |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Platforms 2017-10-02, Platforms 2017-10-23 | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
At least one of my machines is running very heavy queries agains my DB, but i can't find which one. If i login onto a shard mongod and run db.currentOP(), the output shows the clientid as one of the mongos routers, not the real customer application which issued the query to mongos. |
| Comments |
| Comment by Githook User [ 12/Oct/17 ] |
|
Author: {'email': 'mark.benvenuto@mongodb.com', 'name': 'Mark Benvenuto', 'username': 'markbenvenuto'}Message: |
| Comment by Daniel Pasette (Inactive) [ 19/Jun/17 ] |
|
This is fixed neither in the logs upon connection, nor in `currentOp` output. |
| Comment by Andy Schwerin [ 04/Apr/17 ] |
|
Behavior implemented in |
| Comment by Andy Schwerin [ 04/Apr/17 ] |
|
thestick613, I've updated the description slightly, based on your comment that the behavior you were looking for appears to be present in 3.4. If this updated description is incorrect, please reopen the ticket. |
| Comment by Tudor Aursulesei [ 21/Mar/17 ] |
|
this looks fixed in 3.4 http://api.mongodb.com/python/current/api/pymongo/mongo_client.html appname: (string or None) The name of the application that created this MongoClient instance. MongoDB 3.4 and newer will print this value in the server log upon establishing each connection. It is also recorded in the slow query log and profile collections. |
| Comment by Tudor Aursulesei [ 20/Mar/17 ] |
|
I've kind of solved this by putting a mongos on each server that connects to the cluster. I still have to figure out which worker made a specific command, but this is pretty easy. |
| Comment by Kelsey Schubert [ 03/Oct/16 ] |
|
Hi thestick613, Thanks for the clarification. I've marked this ticket as a feature request and assigned it to the Sharding Team for consideration. Please continue to watch for updates. Kind regards, |
| Comment by Tudor Aursulesei [ 02/Oct/16 ] |
|
Does this belong on mongos, not mongod server? This is a pretty reasonable feature improvement. |
| Comment by Kelsey Schubert [ 14/Sep/16 ] |
|
Hi thestick613, Thanks for your report. Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-users group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-users group. Kind regards, |