diff options
author | Geert Bosch <geert@mongodb.com> | 2016-02-01 10:01:27 -0500 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2016-02-01 14:47:46 -0500 |
commit | 2969c83e3dcd4ca26e81b27454938e1c2aa7fe53 (patch) | |
tree | 8501a580f904e5083f7fd774198106117cac1189 /src/mongo/db/concurrency/locker.h | |
parent | 6df889d5b5e432b1829947f99e044aa52ba93f91 (diff) | |
download | mongo-2969c83e3dcd4ca26e81b27454938e1c2aa7fe53.tar.gz |
SERVER-22011: Obtain tickets at outermost global lock in WT
Diffstat (limited to 'src/mongo/db/concurrency/locker.h')
-rw-r--r-- | src/mongo/db/concurrency/locker.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h index 7c19f421e5c..be9f3ea0730 100644 --- a/src/mongo/db/concurrency/locker.h +++ b/src/mongo/db/concurrency/locker.h @@ -48,6 +48,15 @@ class Locker { public: virtual ~Locker() {} + /** + * Require global lock attempts with obtain tickets from 'reading' (for MODE_S and MODE_IS), + * and from 'writing' (for MODE_IX), which must have static lifetimes. There is no throttling + * for MODE_X, as there can only ever be a single locker using this mode. The throttling is + * intended to defend against arge drops in throughput under high load due to too much + * concurrency. + */ + static void setGlobalThrottling(class TicketHolder* reading, class TicketHolder* writing); + virtual LockerId getId() const = 0; /** |