diff options
-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"); |