summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/migration_destination_manager_legacy_commands.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/s/migration_destination_manager_legacy_commands.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/s/migration_destination_manager_legacy_commands.cpp')
-rw-r--r--src/mongo/db/s/migration_destination_manager_legacy_commands.cpp20
1 files changed, 10 insertions, 10 deletions
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, &currentVersion);
+ Status status = shardingState->refreshMetadataNow(opCtx, nss, &currentVersion);
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));