[SERVER-25128] $collStats and $indexStats cannot be used on a view with a non-empty pipeline Created: 18/Jul/16 Updated: 06/Dec/22 Resolved: 13/Dec/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kevin Albertson | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: |
Will produce this error:
|
||||||||
| Participants: | |||||||||
| Description |
|
The $collStats aggregation stage, which will contain relevant statistics about operations run on views, cannot be run on a view if the pipeline is non-empty since it must be the first stage. This also applies to the $indexStats stage, though it's less clear whether we would want $indexStats to run on a view. |
| Comments |
| Comment by Ian Whalen (Inactive) [ 13/Dec/16 ] | |
|
Gone Away since a special case has been added for $collStats on a view in the pipeline command, and there is no need to fix this for $indexStats. | |
| Comment by Kevin Albertson [ 19/Jul/16 ] | |
|
While it is easy to simply check for $collStats/$indexStats as the first stage and exclude the view pipeline in that case, this might set an undesired precedent. For example, suppose a view with only $indexStats is made as follows:
I would think the intention is to only allow access to $indexStats through this view, and to disallow $collStats. If we later add additional meta stages like $collStats/$indexStats, it is not clear to me how they would be handled. |