[SERVER-31098] Wrong ns in system.profile for aggregation query Created: 15/Sep/17 Updated: 30/Oct/23 Resolved: 20/Nov/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework, Diagnostics |
| Affects Version/s: | 3.4.5, 3.5.13 |
| Fix Version/s: | 3.6.11, 4.0.7, 4.1.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Henrik Ingo (Inactive) | Assignee: | Devin Hilly (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | QFB, diagnosibility | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v4.0, v3.6, v3.4
|
||||||||||||||||
| Sprint: | Query 2018-11-19, Query 2018-12-03 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Description |
|
Using the tpch denormalized dataset: http://noexpire.s3.amazonaws.com/sqlproxy/data/tpch_full_denormalized.bson.gz I run the following aggregation pipeline:
The entry in system.profile now contains the wrong ns:
Note that if the same aggregation is executed against an empty database, it actually does result in the right ns (emptydb.mongo_part) logged in system.profile. |
| Comments |
| Comment by Githook User [ 20/Feb/19 ] | ||||||||
|
Author: {'name': 'Devin Hilly', 'email': 'devin.hilly@mongodb.com', 'username': 'dmhilly'}Message: (cherry picked from commit 1862b00862a6ea9c3fdd08bba52ea6a016eccbc5) | ||||||||
| Comment by Githook User [ 06/Feb/19 ] | ||||||||
|
Author: {'name': 'Devin Hilly', 'email': 'devin.hilly@mongodb.com', 'username': 'dmhilly'}Message: (cherry picked from commit 1862b00862a6ea9c3fdd08bba52ea6a016eccbc5) | ||||||||
| Comment by Charlie Swanson [ 20/Nov/18 ] | ||||||||
|
Flagging this for backport consideration. Based on devin.hilly's patch it doesn't seem like it will be terribly complex, but almost certainly will not backport cleanly. For one thing, AutoStatsTracker did not exist in 3.4 - this functionality was rolled into AutoGetcollectionForRead. | ||||||||
| Comment by Githook User [ 20/Nov/18 ] | ||||||||
|
Author: {'name': 'Devin Hilly', 'email': 'devin.hilly@mongodb.com', 'username': 'dmhilly'}Message: | ||||||||
| Comment by Asya Kamsky [ 01/Mar/18 ] | ||||||||
|
The wrong namespace is also written to the logs, not just to the profiler collection. The namespace is the last collection that $lookup uses as "from" field. | ||||||||
| Comment by James Wahlin [ 15/Sep/17 ] | ||||||||
|
We are writing the namespace from the last $lookup performed to the profiler rather than the local collection. This is the case on master as well. The following can be used to repro:
|