diff options
author | Ben Caimano <ben.caimano@mongodb.com> | 2019-12-16 21:39:41 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-12-16 21:39:41 +0000 |
commit | 86efdd6b047927d3a37577a6033bacc709c7ae89 (patch) | |
tree | 0fc01e4928e001914731159ce8c2dec7116929d0 /src/mongo/util/background.cpp | |
parent | ec498c5968974012d50d6d04c26cd2cd0db87d22 (diff) | |
download | mongo-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.cpp | 4 |
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. |