diff options
author | Maria van Keulen <maria@mongodb.com> | 2019-05-30 10:52:50 -0400 |
---|---|---|
committer | Maria van Keulen <maria@mongodb.com> | 2019-05-31 15:17:37 -0400 |
commit | 8cabc69905b649a069f1124cf02e0cf46ff86a58 (patch) | |
tree | 0069086a7415e591867f18ea581ef7f9db261cb1 /src/mongo/db/db.cpp | |
parent | 3c30ac7668627e37aaecab96346b60cc0174a0dd (diff) | |
download | mongo-8cabc69905b649a069f1124cf02e0cf46ff86a58.tar.gz |
SERVER-41345 Do not Flow Control after ticket refresher has shut down
Diffstat (limited to 'src/mongo/db/db.cpp')
-rw-r--r-- | src/mongo/db/db.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 107de1fd660..ad3fa439f22 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -62,6 +62,7 @@ #include "mongo/db/commands/feature_compatibility_version.h" #include "mongo/db/commands/feature_compatibility_version_gen.h" #include "mongo/db/concurrency/d_concurrency.h" +#include "mongo/db/concurrency/flow_control_ticketholder.h" #include "mongo/db/concurrency/lock_state.h" #include "mongo/db/concurrency/replication_state_transition_lock_guard.h" #include "mongo/db/concurrency/write_conflict_exception.h" @@ -916,6 +917,12 @@ void shutdownTask(const ShutdownTaskArgs& shutdownArgs) { runner->shutdown(); } + // Inform Flow Control to stop gating writes on ticket admission. This is necessary because the + // ticket refresher thread is stopped as part of the shut down process (see SERVER-41345). + if (auto flowControlTicketholder = FlowControlTicketholder::get(serviceContext)) { + flowControlTicketholder->setInShutdown(); + } + if (serviceContext->getStorageEngine()) { ServiceContext::UniqueOperationContext uniqueOpCtx; OperationContext* opCtx = client->getOperationContext(); |