SERVER-135737ClosedFixed

Fix memory exhaustion issue in FLE2 operation stats collection

In fle_stats.cpp, each {{incrementXCount()}} function calls {{{}registerCollectionStats(){}}}, which does {{{}getOrEmplace(nss, ...){}}}. That means every operation creates a map entry if one doesn't exist yet. Both inputs come straight from the request: - {{nss}} is the request's namespace. - {{efc}} is parsed from the client-supplied {{{}encryptionInformation{}}}. The only code that ever removes an entry is {{{}deregisterCollectionStats{}}}, and it runs only from the collection catalog

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc10258.3.169.0.78.0.37
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.