summaryrefslogtreecommitdiff
path: root/src/mongo/db/db_raii.cpp
diff options
context:
space:
mode:
authorHugh Tong <hugh.tong@mongodb.com>2022-05-09 16:00:06 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-09 21:31:49 +0000
commit6989f87e400acff7e668ba4472d4f91adf938683 (patch)
tree276ba283e6ef6f0506b940f2dab2b6f1f71371a6 /src/mongo/db/db_raii.cpp
parent32e2e0d1385f6e47f829ff70b9fce95b3873a54f (diff)
downloadmongo-6989f87e400acff7e668ba4472d4f91adf938683.tar.gz
SERVER-64609 Rename instances of TenantDatabaseName to DatabaseName
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r--src/mongo/db/db_raii.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp
index 7c02ea125d0..b9e6bc38f46 100644
--- a/src/mongo/db/db_raii.cpp
+++ b/src/mongo/db/db_raii.cpp
@@ -878,13 +878,13 @@ AutoGetCollectionForReadCommandLockFree::AutoGetCollectionForReadCommandLockFree
OldClientContext::OldClientContext(OperationContext* opCtx, const std::string& ns, bool doVersion)
: _opCtx(opCtx) {
- // TODO SERVER-65488 Grab the TenantDatabaseName from the NamespaceString passed in
- const auto dbName = nsToDatabaseSubstring(ns);
- const TenantDatabaseName tenantDbName(boost::none, dbName);
- _db = DatabaseHolder::get(opCtx)->getDb(opCtx, tenantDbName);
+ // TODO SERVER-65488 Grab the DatabaseName from the NamespaceString passed in
+ const auto db = nsToDatabaseSubstring(ns);
+ const DatabaseName dbName(boost::none, db);
+ _db = DatabaseHolder::get(opCtx)->getDb(opCtx, dbName);
if (!_db) {
- _db = DatabaseHolder::get(opCtx)->openDb(_opCtx, tenantDbName, &_justCreated);
+ _db = DatabaseHolder::get(opCtx)->openDb(_opCtx, dbName, &_justCreated);
invariant(_db);
}
@@ -905,7 +905,7 @@ OldClientContext::OldClientContext(OperationContext* opCtx, const std::string& n
stdx::lock_guard<Client> lk(*_opCtx->getClient());
currentOp->enter_inlock(
- ns.c_str(), CollectionCatalog::get(opCtx)->getDatabaseProfileLevel(_db->name().dbName()));
+ ns.c_str(), CollectionCatalog::get(opCtx)->getDatabaseProfileLevel(_db->name().db()));
}
AutoGetCollectionForReadCommandMaybeLockFree::AutoGetCollectionForReadCommandMaybeLockFree(