diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2020-10-22 21:55:16 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-05 20:54:49 +0000 |
commit | 0e400a736bacfa291dbda2971f7381ad392000c9 (patch) | |
tree | eb3ae2e8652a4e2a4800df946250b5109abe4c45 /src/mongo/util/latch_analyzer.h | |
parent | 330d2ee8672720d46b3d393c54b078425ced6b4f (diff) | |
download | mongo-0e400a736bacfa291dbda2971f7381ad392000c9.tar.gz |
SERVER-51068 Provide unique errors for each variety of Latch violation
Diffstat (limited to 'src/mongo/util/latch_analyzer.h')
-rw-r--r-- | src/mongo/util/latch_analyzer.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/util/latch_analyzer.h b/src/mongo/util/latch_analyzer.h index 328e5549695..3eea2f1222e 100644 --- a/src/mongo/util/latch_analyzer.h +++ b/src/mongo/util/latch_analyzer.h @@ -89,6 +89,20 @@ private: int onRelease = 0; }; + // Either warn about the violation or crash the process. + void _handleViolation(ErrorCodes::Error ec, + StringData message, + const latch_detail::Identity& identity, + Client* client) noexcept; + void _handleAcquireViolation(ErrorCodes::Error ec, + StringData message, + const latch_detail::Identity& identity, + Client* client) noexcept; + void _handleReleaseViolation(ErrorCodes::Error ec, + StringData message, + const latch_detail::Identity& identity, + Client* client) noexcept; + AtomicWord<bool> _allowExitOnViolation{true}; mutable stdx::mutex _mutex; // NOLINT |