summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/restart_catalog_command.cpp
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2019-10-02 18:27:38 +0000
committerevergreen <evergreen@mongodb.com>2019-10-02 18:27:38 +0000
commitac796463d5f6fbca4e0b7f2dd0f6da2a58a66a9e (patch)
treef2c30f40933bd1f6cd653831d54c421aaef555e9 /src/mongo/db/commands/restart_catalog_command.cpp
parent96a7542b2fd6abbdc7a27f12e5cece7310208716 (diff)
downloadmongo-ac796463d5f6fbca4e0b7f2dd0f6da2a58a66a9e.tar.gz
SERVER-43352 RestartCatalog expects listDatabases to include empty databases
Diffstat (limited to 'src/mongo/db/commands/restart_catalog_command.cpp')
-rw-r--r--src/mongo/db/commands/restart_catalog_command.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/commands/restart_catalog_command.cpp b/src/mongo/db/commands/restart_catalog_command.cpp
index 5713cd66a54..99858abf378 100644
--- a/src/mongo/db/commands/restart_catalog_command.cpp
+++ b/src/mongo/db/commands/restart_catalog_command.cpp
@@ -96,8 +96,7 @@ public:
// marked drop-pending. (Otherwise, the Database object will be reconstructed when
// re-opening the catalog, but with the drop pending flag cleared.)
auto databaseHolder = DatabaseHolder::get(opCtx);
- std::vector<std::string> allDbs =
- getGlobalServiceContext()->getStorageEngine()->listDatabases();
+ std::vector<std::string> allDbs = databaseHolder->getNames();
for (auto&& dbName : allDbs) {
const auto db = databaseHolder->getDb(opCtx, dbName);
if (db->isDropPending(opCtx)) {