[SERVER-36410] View definitions should permit specifying allowDiskUse:true and other aggregation options as part of the view. Created: 02/Aug/18 Updated: 06/Dec/22 Resolved: 17/Aug/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework, Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | William Byrne III | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | read-only-views | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
The createView() command is just a wrapper for the create command That is why the view creation options are a subset of those available when creating collections, rather than those for aggregation statements. When querying a view with an aggregate operation, users can specify allowDiskUse:true and non default values for allowDiskUse, cursor, maxTimeMS, and readConcern. But when querying a view with a find operation, users cannot do that. When creating a view, I suggest allowDiskUse:true and perhaps some of the other aggregation options should be able to be included in the definition. The values for these fields would then become part of the aggregation statements generated for queries against the view. |
| Comments |
| Comment by Kyle Suarez [ 17/Aug/18 ] |
|
Hey william.byrne, The Query Team does not want to implement this feature. Looking at the scope and design documents, we did not explicitly call out the allowDiskUse option, but there are some reasons behind our decision:
As a workaround, users can instead run the aggregate command on the view. |
| Comment by Asya Kamsky [ 17/Aug/18 ] |
|
> But when querying a view with a find operation, users cannot do that Why can't users specify maxTimeMS, readConcern, etc. when using find? |
| Comment by William Byrne III [ 02/Aug/18 ] |
|
Somewhat a duplicate of SERVER-27440. That is for allowDiskUse only, whereas this covers other aggregation modifiers like cursor and readConcern. |