[SERVER-25444] Resolving a view may create a pipeline that exceeds 16 MB Created: 04/Aug/16 Updated: 19/Nov/16 Resolved: 22/Sep/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.15 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kyle Suarez | Assignee: | Samuel Rossi (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | read-only-views | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Integration 2016-09-19, Integration 2016-10-10 |
| Participants: |
| Description |
|
When creating a sequence of views on views, the final resolved pipeline may exceed the maximum document size. This will be bad if the view is on a sharded collection, as the error response from the primary shard to mongos will be too large to handle. We should impose some sort of limit when creating/modifying a view definition and/or check the size of the resolved view on resolution and fail if it is too large. |
| Comments |
| Comment by Githook User [ 22/Sep/16 ] |
|
Author: {u'name': u'Sam Rossi', u'email': u'sam.rossi@mongodb.com'}Message: |
| Comment by Andy Schwerin [ 08/Aug/16 ] |
|
I think it will be hard to do this at view modification time, since you might be modifying the middle view that's part of many other views, and you'd have to find all of them and validate them. Even then, users might still manage to write to system.views directly and create illegally sized view pipelines. As such, I recommend that this check be complemented with work to ensure that the user gets a helpful error message when they attempt to query a view that is too large, regardless of whether the cluster is sharded or not. |