summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/list_databases.cpp
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2017-03-07 12:00:08 -0500
committerMaria van Keulen <maria@mongodb.com>2017-03-07 12:00:08 -0500
commit589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79 (patch)
treec7a090ffdd56a91ae677e2492c61b820af44f964 /src/mongo/db/commands/list_databases.cpp
parent3cba97198638df3750e3b455e2ad57af7ee536ae (diff)
downloadmongo-589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79.tar.gz
SERVER-27938 Rename all OperationContext variables to opCtx
This commit is an automated rename of all whole word instances of txn, _txn, and txnPtr to opCtx, _opCtx, and opCtxPtr, respectively in all .cpp and .h files in src/mongo.
Diffstat (limited to 'src/mongo/db/commands/list_databases.cpp')
-rw-r--r--src/mongo/db/commands/list_databases.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/commands/list_databases.cpp b/src/mongo/db/commands/list_databases.cpp
index 08de6f6cd6f..ccc2f82cc49 100644
--- a/src/mongo/db/commands/list_databases.cpp
+++ b/src/mongo/db/commands/list_databases.cpp
@@ -83,7 +83,7 @@ public:
CmdListDatabases() : Command("listDatabases", true) {}
- bool run(OperationContext* txn,
+ bool run(OperationContext* opCtx,
const string& dbname,
BSONObj& jsobj,
int,
@@ -114,8 +114,8 @@ public:
vector<string> dbNames;
StorageEngine* storageEngine = getGlobalServiceContext()->getGlobalStorageEngine();
{
- ScopedTransaction transaction(txn, MODE_IS);
- Lock::GlobalLock lk(txn->lockState(), MODE_IS, UINT_MAX);
+ ScopedTransaction transaction(opCtx, MODE_IS);
+ Lock::GlobalLock lk(opCtx->lockState(), MODE_IS, UINT_MAX);
storageEngine->listDatabases(&dbNames);
}
@@ -135,17 +135,17 @@ public:
if (filterNameOnly && !filter->matchesBSON(b.asTempObj()))
continue;
- ScopedTransaction transaction(txn, MODE_IS);
- Lock::DBLock dbLock(txn->lockState(), dbname, MODE_IS);
+ ScopedTransaction transaction(opCtx, MODE_IS);
+ Lock::DBLock dbLock(opCtx->lockState(), dbname, MODE_IS);
- Database* db = dbHolder().get(txn, dbname);
+ Database* db = dbHolder().get(opCtx, dbname);
if (!db)
continue;
const DatabaseCatalogEntry* entry = db->getDatabaseCatalogEntry();
invariant(entry);
- size = entry->sizeOnDisk(txn);
+ size = entry->sizeOnDisk(opCtx);
b.append("sizeOnDisk", static_cast<double>(size));
b.appendBool("empty", entry->isEmpty());