-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Diagnostics, Query Execution
-
None
-
Query Execution
-
Minor Change
-
v9.0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
serverStatus().queryMemory.loadShedding is omitted whenever load shedding is disabled (queryMemoryLoadSheddingLowMarkPercent = -1), because of the early return in appendQueryMemoryLoadSheddingStats(). Mongotune switches shedding on and off over time, so consumers see gaps in the cumulative operationsShed / idleCursorsShed / idleCursorBytesShed counters.
Atlas auto-scaling (TUNE-1578) will compute a rate from operationsShed. It treats missing samples as "metric unavailable", so the gaps can stop it from ever firing.
Proposal: on processes that support shedding (not pure mongos), always emit the three counters. Add a boolean active field, and emit the threshold and usage fields only while shedding is active. Backport to the versions QMLS targets (9.0).
—
One thing to check while implementing: operationsShed and idleShed are reached through pointers, so they may not be set up until shedding is first enabled. That case would need to report 0.
Also, check whether the metrics needs to be in MaaS for autoscaler to consume it.
- causes
-
SERVER-138874 Transient negative metric via disabling load shedding during a serverStatus read
-
- In Code Review
-