diff options
author | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2019-10-02 18:27:38 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-02 18:27:38 +0000 |
commit | ac796463d5f6fbca4e0b7f2dd0f6da2a58a66a9e (patch) | |
tree | f2c30f40933bd1f6cd653831d54c421aaef555e9 /src/mongo/db/commands/restart_catalog_command.cpp | |
parent | 96a7542b2fd6abbdc7a27f12e5cece7310208716 (diff) | |
download | mongo-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.cpp | 3 |
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)) { |