diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-12-14 11:57:35 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-12-16 11:43:28 -0500 |
commit | 8467708af7fa83f8827362b80f56dab4aad30a41 (patch) | |
tree | ab7858f01ec8ced3111c583ec33e1a55f89d27fe /src/mongo/db/commands/list_databases.cpp | |
parent | 6cbca62471218a08a4fdf8785bd1e1e38cf9bde3 (diff) | |
download | mongo-8467708af7fa83f8827362b80f56dab4aad30a41.tar.gz |
SERVER-29909 Remove circular dependency between db_raii and sharding libraries
Diffstat (limited to 'src/mongo/db/commands/list_databases.cpp')
-rw-r--r-- | src/mongo/db/commands/list_databases.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mongo/db/commands/list_databases.cpp b/src/mongo/db/commands/list_databases.cpp index 15d1139df8b..aa5130c4410 100644 --- a/src/mongo/db/commands/list_databases.cpp +++ b/src/mongo/db/commands/list_databases.cpp @@ -28,13 +28,13 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/auth/authorization_session.h" -#include "mongo/db/catalog/database.h" +#include "mongo/db/catalog/catalog_raii.h" #include "mongo/db/catalog/database_catalog_entry.h" -#include "mongo/db/catalog/database_holder.h" #include "mongo/db/client.h" #include "mongo/db/commands.h" -#include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/matcher/expression.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" @@ -152,9 +152,8 @@ public: if (filterNameOnly && !filter->matchesBSON(b.asTempObj())) continue; - Lock::DBLock dbLock(opCtx, dbname, MODE_IS); - - Database* db = dbHolder().get(opCtx, dbname); + AutoGetDb autoDb(opCtx, dbname, MODE_IS); + Database* const db = autoDb.getDb(); if (!db) continue; |