diff options
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r-- | src/mongo/db/db_raii.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp index 2d3279dc41e..f078ccf4966 100644 --- a/src/mongo/db/db_raii.cpp +++ b/src/mongo/db/db_raii.cpp @@ -279,11 +279,11 @@ AutoGetCollectionForReadCommand::AutoGetCollectionForReadCommand( } OldClientContext::OldClientContext(OperationContext* opCtx, const std::string& ns, bool doVersion) - : _opCtx(opCtx), _db(DatabaseHolder::getDatabaseHolder().get(opCtx, ns)) { + : _opCtx(opCtx), _db(DatabaseHolder::get(opCtx)->getDb(opCtx, ns)) { if (!_db) { const auto dbName = nsToDatabaseSubstring(ns); invariant(_opCtx->lockState()->isDbLockedForMode(dbName, MODE_X)); - _db = DatabaseHolder::getDatabaseHolder().openDb(_opCtx, dbName, &_justCreated); + _db = DatabaseHolder::get(opCtx)->openDb(_opCtx, dbName, &_justCreated); invariant(_db); } |