diff options
Diffstat (limited to 'src/mongo/s/mongos_main.cpp')
| -rw-r--r-- | src/mongo/s/mongos_main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/s/mongos_main.cpp b/src/mongo/s/mongos_main.cpp index 0504b714aec..441e60a7f1a 100644 --- a/src/mongo/s/mongos_main.cpp +++ b/src/mongo/s/mongos_main.cpp @@ -341,6 +341,7 @@ void cleanupTask(const ShutdownTaskArgs& shutdownArgs) { } if (auto pool = Grid::get(opCtx)->getExecutorPool()) { + LOGV2_OPTIONS(7698300, {LogComponent::kSharding}, "Shutting down the ExecutorPool"); pool->shutdownAndJoin(); } @@ -349,6 +350,13 @@ void cleanupTask(const ShutdownTaskArgs& shutdownArgs) { } 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(7698301, {LogComponent::kSharding}, "Shutting down the CatalogCache"); + Grid::get(serviceContext)->catalogCache()->shutDownAndJoin(); + + LOGV2_OPTIONS( + 7698302, {LogComponent::kSharding}, "Shutting down the CatalogCacheLoader"); CatalogCacheLoader::get(serviceContext).shutDown(); } |
