[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:
Related
is related to SERVER-45099 Serialize index builds on secondary m... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2019-09-09
Participants:
Case:

 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

Generated at Thu Feb 08 05:01:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.