[SERVER-37821] Modify explain output for aggregations against mongos which target unsharded collections Created: 30/Oct/18 Updated: 06/Dec/22 Resolved: 26/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jeffrey Yemin | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | neweng, query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Query
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: | On a sharded cluster
stages array is at the top level of the explain output Actual results stages array is nested within shards.<shard name> Sample output:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
On master with a sharded cluster but an unsharded collection, the stages array in the explain output of an aggregate command with hint and $out is nested in shards.<shard name>. This is different than 4.0 and earlier branches, in which the stages array is at the top level. |
| Comments |
| Comment by Nicholas Zolnierz [ 31/Oct/18 ] |
|
Putting into Needs Scheduling as I've verified this is indeed a regression. Allowing the $out to passthrough from mongos here fixes the explain output, but would cause undesirable side effects with respect to the unique key validation. |
| Comment by Nicholas Zolnierz [ 30/Oct/18 ] |
|
Good catch jeff.yemin. I was able to reproduce this, with or without the hint. I believe it may be related to forcing a full parse on mongos even for unsharded collections from this commit. |
| Comment by Charlie Swanson [ 30/Oct/18 ] |
|
Assigning to nicholas.zolnierz to take a look and see if we know when/why this changed. |