From 589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79 Mon Sep 17 00:00:00 2001 From: Maria van Keulen Date: Tue, 7 Mar 2017 12:00:08 -0500 Subject: 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. --- ...migration_destination_manager_legacy_commands.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/mongo/db/s/migration_destination_manager_legacy_commands.cpp') diff --git a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp index 3d684fda290..d3d54f6710c 100644 --- a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp +++ b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp @@ -85,13 +85,13 @@ public: out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); } - bool run(OperationContext* txn, + bool run(OperationContext* opCtx, const string&, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result) { - auto shardingState = ShardingState::get(txn); + auto shardingState = ShardingState::get(opCtx); uassertStatusOK(shardingState->canAcceptShardedCommands()); const ShardId toShard(cmdObj["toShardName"].String()); @@ -106,7 +106,7 @@ public: // consistent and predictable, generally we'd refresh anyway, and to be paranoid. ChunkVersion currentVersion; - Status status = shardingState->refreshMetadataNow(txn, nss, ¤tVersion); + Status status = shardingState->refreshMetadataNow(opCtx, nss, ¤tVersion); if (!status.isOK()) { errmsg = str::stream() << "cannot start receiving chunk " << redact(chunkRange.toString()) << causedBy(redact(status)); @@ -118,7 +118,7 @@ public: const auto secondaryThrottle = uassertStatusOK(MigrationSecondaryThrottleOptions::createFromCommand(cmdObj)); const auto writeConcern = uassertStatusOK( - ChunkMoveWriteConcernOptions::getEffectiveWriteConcern(txn, secondaryThrottle)); + ChunkMoveWriteConcernOptions::getEffectiveWriteConcern(opCtx, secondaryThrottle)); BSONObj shardKeyPattern = cmdObj["shardKeyPattern"].Obj().getOwned(); @@ -199,13 +199,13 @@ public: out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); } - bool run(OperationContext* txn, + bool run(OperationContext* opCtx, const string&, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result) { - ShardingState::get(txn)->migrationDestinationManager()->report(result); + ShardingState::get(opCtx)->migrationDestinationManager()->report(result); return true; } @@ -240,14 +240,14 @@ public: out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); } - bool run(OperationContext* txn, + bool run(OperationContext* opCtx, const string&, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result) { auto const sessionId = uassertStatusOK(MigrationSessionId::extractFromBSON(cmdObj)); - auto mdm = ShardingState::get(txn)->migrationDestinationManager(); + auto mdm = ShardingState::get(opCtx)->migrationDestinationManager(); Status const status = mdm->startCommit(sessionId); mdm->report(result); if (!status.isOK()) { @@ -288,13 +288,13 @@ public: out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); } - bool run(OperationContext* txn, + bool run(OperationContext* opCtx, const string&, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result) { - auto const mdm = ShardingState::get(txn)->migrationDestinationManager(); + auto const mdm = ShardingState::get(opCtx)->migrationDestinationManager(); auto migrationSessionIdStatus(MigrationSessionId::extractFromBSON(cmdObj)); -- cgit v1.2.1