diff options
author | Geert Bosch <geert@mongodb.com> | 2016-02-10 14:08:01 -0500 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2016-02-10 18:25:44 -0500 |
commit | f8dadcefeef7e738d7063ae2df57b9c856b402da (patch) | |
tree | b8a1c8d80d77d1ab10e102e2e113dee7d613c52b /src/mongo/db/concurrency/locker.h | |
parent | c424db4c199a003aa852337b23d19444f26b6745 (diff) | |
download | mongo-f8dadcefeef7e738d7063ae2df57b9c856b402da.tar.gz |
SERVER-21859: ServerStatus should report clients queued on global/ticket lock
Diffstat (limited to 'src/mongo/db/concurrency/locker.h')
-rw-r--r-- | src/mongo/db/concurrency/locker.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h index be9f3ea0730..cdc490e1379 100644 --- a/src/mongo/db/concurrency/locker.h +++ b/src/mongo/db/concurrency/locker.h @@ -57,6 +57,17 @@ public: */ static void setGlobalThrottling(class TicketHolder* reading, class TicketHolder* writing); + /** + * State for reporting the number of active and queued reader and writer clients. + */ + enum ClientState { kInactive, kActiveReader, kActiveWriter, kQueuedReader, kQueuedWriter }; + + /** + * Return whether client is holding any locks (active), or is queued on any locks or waiting + * for a ticket (throttled). + */ + virtual ClientState getClientState() const = 0; + virtual LockerId getId() const = 0; /** |