[SERVER-42931] KeyString::Value should report its memory usage as the total buffer capacity Created: 20/Aug/19 Updated: 29/Oct/23 Resolved: 30/Aug/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | KP42 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Execution Team 2019-09-09 | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
The external sorted uses memUsageForSorter to estimate when to spill to disk. KeyString::Value should report its memory usage as the total capacity of the underlying SharedBuffer rather than the number of bytes used out of the entire buffer length. This will probably require adding a "capacity()" function to ConstSharedBuffer to access into its underlying SharedBuffer. |
| Comments |
| Comment by Louis Williams [ 30/Aug/19 ] |
|
Commit on master: https://github.com/mongodb/mongo/commit/04613497fd86a253a0c0fdaf05bcaebe0f8ad39e |