[SERVER-80149] Use MemoryUsageTracker instead of protected variable in AccumulatorState Created: 16/Aug/23 Updated: 29/Oct/23 Resolved: 21/Aug/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ivan Fefer | Assignee: | Ivan Fefer |
| 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: | QE 2023-08-21, QE 2023-09-04 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 105 | ||||||||||||
| Description |
|
AccumulatorState just exposes protected variable for derived classes to track the memory usage: https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/accumulator.h#L167 It is unsafe and causes memory underflow. We should use MemoryUsageTracker and MemoryTokens instead. |
| Comments |
| Comment by Githook User [ 21/Aug/23 ] |
|
Author: {'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}Message: |