Unless ServerStatusMetricField relies on a storage container which provides thread-safe primitives, the serverStatus command can report corrupted data if one thread is reading the contents of a field while another is writing to it.
The current code base contains at least one instance of it where a ServerStatusMetricField is built out of a std::string which doesn't guarantee thread safety.
It is worth to notice that this should be carefully designed as it could lead to service degradation due to the introduction of currently inexistent contention and metrics are spread throughout all of the code base.
Acceptance Criteria: Either create a mechanism to atomically swap the contents of a ServerStatusMetricField or make sure all stored types are thread-safe by design.
- is related to
-
SERVER-65987 ServerStatusMetric API refresh
- Closed
-
SERVER-67333 ServerStatusMetric API refresh follow-up
- Closed