diff options
author | Antonio Fuschetto <antonio.fuschetto@mongodb.com> | 2023-05-15 06:38:47 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-15 07:43:15 +0000 |
commit | 1578ea98998e33d06cc1776f2bbd86d626370124 (patch) | |
tree | e602da159d19ebe0586cec20c0501517fb8056fe | |
parent | 2ea266820fbd6629769309d6462c250b8b1bee73 (diff) | |
download | mongo-1578ea98998e33d06cc1776f2bbd86d626370124.tar.gz |
SERVER-77074 Always shutdown and join the CatalogCached's thread pool when mongod terminates
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index 01b9fef468e..589ad967da8 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -1588,7 +1588,7 @@ void shutdownTask(const ShutdownTaskArgs& shutdownArgs) { migrationUtilExecutor->shutdown(); migrationUtilExecutor->join(); - if (ShardingState::get(serviceContext)->enabled()) { + if (Grid::get(serviceContext)->isShardingInitialized()) { // The CatalogCache must be shuted down before shutting down the CatalogCacheLoader as the // CatalogCache may try to schedule work on CatalogCacheLoader and fail. LOGV2_OPTIONS(6773201, {LogComponent::kSharding}, "Shutting down the CatalogCache"); |