diff options
author | Maria van Keulen <maria@mongodb.com> | 2017-03-07 12:00:08 -0500 |
---|---|---|
committer | Maria van Keulen <maria@mongodb.com> | 2017-03-07 12:00:08 -0500 |
commit | 589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79 (patch) | |
tree | c7a090ffdd56a91ae677e2492c61b820af44f964 /src/mongo/db/commands/validate.cpp | |
parent | 3cba97198638df3750e3b455e2ad57af7ee536ae (diff) | |
download | mongo-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/validate.cpp')
-rw-r--r-- | src/mongo/db/commands/validate.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/commands/validate.cpp b/src/mongo/db/commands/validate.cpp index 02c577da9c8..2fc05974986 100644 --- a/src/mongo/db/commands/validate.cpp +++ b/src/mongo/db/commands/validate.cpp @@ -75,7 +75,7 @@ public: } //{ validate: "collectionnamewithoutthedbpart" [, scandata: <bool>] [, full: <bool> } */ - bool run(OperationContext* txn, + bool run(OperationContext* opCtx, const string& dbname, BSONObj& cmdObj, int, @@ -109,11 +109,11 @@ public: LOG(0) << "CMD: validate " << nss.ns(); } - AutoGetDb ctx(txn, nss.db(), MODE_IX); - Lock::CollectionLock collLk(txn->lockState(), nss.ns(), MODE_X); + AutoGetDb ctx(opCtx, nss.db(), MODE_IX); + Lock::CollectionLock collLk(opCtx->lockState(), nss.ns(), MODE_X); Collection* collection = ctx.getDb() ? ctx.getDb()->getCollection(nss) : NULL; if (!collection) { - if (ctx.getDb() && ctx.getDb()->getViewCatalog()->lookup(txn, nss.ns())) { + if (ctx.getDb() && ctx.getDb()->getViewCatalog()->lookup(opCtx, nss.ns())) { errmsg = "Cannot validate a view"; return appendCommandStatus(result, {ErrorCodes::CommandNotSupportedOnView, errmsg}); } @@ -125,7 +125,7 @@ public: result.append("ns", nss.ns()); ValidateResults results; - Status status = collection->validate(txn, level, &results, &result); + Status status = collection->validate(opCtx, level, &results, &result); if (!status.isOK()) return appendCommandStatus(result, status); |