SERVER-139122In Code Review

Query-memory load shedding: fix double count, log outside client locks, trim RSS read under mutex, correct "never throws" comment

Items 4, 5, 6 and 8 of SERVER-138793. All four are in {{query_memory_load_shedding.h}} and {{query_memory_load_shedding.cpp}}. *Double count (item 6).* The queued-operation sweep kills an op with {{killOperation()}} then {{recordShed()}}. The op's own thread, in {{queryMemoryCheckLoadShedding}}, calls {{markKilled()}} then {{recordShed()}} without checking for a pending kill. If both paths hit one op, {{operationsShed}} and {{bytesShed}} count it twice. The callers run {{checkForInterrupt()}} b

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.