Details
Description
We decrement from memUsage when we free unused buffers from _activeBuffers here. The calculation is incorrect and undercounts actual freed memory causing the memUsage stat to balloon. This can be a problem when the memusage stat grows past the in-memory limit for the sorter resulting in spilling to disk on every key added to the sorter, eventually leading to an OOM issue.
Attachments
Issue Links
- is caused by
-
SERVER-68125 Index build on multi-key fields can consume more memory than limit
-
- Closed
-
- related to
-
SERVER-82037 Memory used by sorter spills can grow without bound
-
- Backlog
-