summaryrefslogtreecommitdiff
path: root/src/mongo/util/background.cpp
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@mongodb.com>2019-12-16 21:39:41 +0000
committerevergreen <evergreen@mongodb.com>2019-12-16 21:39:41 +0000
commit86efdd6b047927d3a37577a6033bacc709c7ae89 (patch)
tree0fc01e4928e001914731159ce8c2dec7116929d0 /src/mongo/util/background.cpp
parentec498c5968974012d50d6d04c26cd2cd0db87d22 (diff)
downloadmongo-86efdd6b047927d3a37577a6033bacc709c7ae89.tar.gz
SERVER-43945 Expose out of order latch acquisitions in serverStatus
This review does several related things: - Modifies the Mutex type to have one Identity object per invocation context - Adds a latchAnalysis field to serverStatus - Officially turns on CI-only failure for acq level violations - Changes a few acq level declarations to be more permissive
Diffstat (limited to 'src/mongo/util/background.cpp')
-rw-r--r--src/mongo/util/background.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/util/background.cpp b/src/mongo/util/background.cpp
index 9dff4675fc7..6951bf86681 100644
--- a/src/mongo/util/background.cpp
+++ b/src/mongo/util/background.cpp
@@ -81,7 +81,9 @@ private:
void _runTask(PeriodicTask* task);
// _mutex protects the _shutdownRequested flag and the _tasks vector.
- Mutex _mutex = MONGO_MAKE_LATCH(HierarchicalAcquisitionLevel(0), "PeriodicTaskRunner::_mutex");
+ Mutex _mutex = MONGO_MAKE_LATCH(
+ // This mutex is held around task execution HierarchicalAcquisitionLevel(0),
+ "PeriodicTaskRunner::_mutex");
// The condition variable is used to sleep for the interval between task
// executions, and is notified when the _shutdownRequested flag is toggled.