[SERVER-50771] The BSONValidate fast path should support a depth of 32 Created: 04/Sep/20 Updated: 29/Oct/23 Resolved: 08/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Geert Bosch | Assignee: | Geert Bosch |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Execution Team 2020-09-21 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
BSONValidate has a fast path avoiding dynamic memory allocation that currently handles up to 16 levels of nesting. The structure of database commands themselves add some levels in addition to that of nesting depth of the document acted on. So, it is conceivable that there are actual use cases where the current limit of 16 may unnecessarily result in fallback to the slower dynamically sized implementation. Changing the fast path maximum frame depth to 32 adds 8 * 16 = 128 bytes to the stack requirements of BSONValidate, which seems a reasonable trade-off. |
| Comments |
| Comment by Githook User [ 08/Sep/20 ] |
|
Author: {'name': 'Geert Bosch', 'email': 'geert@mongodb.com', 'username': 'GeertBosch'}Message: |