[SERVER-73526] DocumentSourceGroup should spill in debug builds when allowDiskUse is true, not when allowDiskUse is false Created: 01/Feb/23 Updated: 29/Oct/23 Resolved: 02/May/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Query Execution |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | QE 2023-05-15 |
| Participants: |
| Description |
|
There is longstanding behavior in which DocumentSourceGroup will spill eagerly in debug builds, even when the memory limit is not yet exhausted. (Similar behavior was added in SBE's HashAggStage as part of This dates from the days when disk use was disallowed by default. The rationale was that when disk use is allowed, this means that the client has explicitly enabled spilling. and the query is likely trying to test spilling behavior explicitly. In such situations, the logic to spill eagerly did not kick in, as it could interfere with spilling-related tests. On the other hand, when disk use was not explicitly enabled, we would spill in the background, thus ensuring that all of our $group tests unrelated to spilling still work as expected even if spilling occurs.
The work for this ticket is to invert the logic so that the extra spilling in debug builds kicks in when allowDiskUse is true and not when allowDiskUse is false. This may require adjusting tests that make assertions about spill-related execution stats to either not run against debug builds, or to expect different spill behavior when running against a debug build. |
| Comments |
| Comment by Githook User [ 02/May/23 ] |
|
Author: {'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}Message: This behavior is intended to provide extra test coverage for |