summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/shard_connection.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/s/client/shard_connection.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/s/client/shard_connection.cpp')
-rw-r--r--src/mongo/s/client/shard_connection.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/s/client/shard_connection.cpp b/src/mongo/s/client/shard_connection.cpp
index ec80fb5c5e5..0a5d178ba3e 100644
--- a/src/mongo/s/client/shard_connection.cpp
+++ b/src/mongo/s/client/shard_connection.cpp
@@ -111,7 +111,7 @@ public:
out->push_back(Privilege(ResourcePattern::forClusterResource(), actions));
}
- virtual bool run(OperationContext* txn,
+ virtual bool run(OperationContext* opCtx,
const string& dbname,
mongo::BSONObj& cmdObj,
int options,
@@ -273,7 +273,7 @@ public:
s->avail = conn;
}
- void checkVersions(OperationContext* txn, const string& ns) {
+ void checkVersions(OperationContext* opCtx, const string& ns) {
vector<ShardId> all;
grid.shardRegistry()->getAllShardIds(&all);
@@ -283,7 +283,7 @@ public:
// Now only check top-level shard connections
for (const ShardId& shardId : all) {
try {
- auto shardStatus = grid.shardRegistry()->getShard(txn, shardId);
+ auto shardStatus = grid.shardRegistry()->getShard(opCtx, shardId);
if (!shardStatus.isOK()) {
invariant(shardStatus == ErrorCodes::ShardNotFound);
continue;
@@ -298,7 +298,7 @@ public:
s->created++; // After, so failed creation doesn't get counted
}
- versionManager.checkShardVersionCB(txn, s->avail, ns, false, 1);
+ versionManager.checkShardVersionCB(opCtx, s->avail, ns, false, 1);
} catch (const DBException& ex) {
warning() << "problem while initially checking shard versions on"
<< " " << shardId << causedBy(ex);
@@ -450,9 +450,9 @@ void ShardConnection::_finishInit() {
if (versionManager.isVersionableCB(_conn)) {
auto& client = cc();
- auto txn = client.getOperationContext();
- invariant(txn);
- _setVersion = versionManager.checkShardVersionCB(txn, this, false, 1);
+ auto opCtx = client.getOperationContext();
+ invariant(opCtx);
+ _setVersion = versionManager.checkShardVersionCB(opCtx, this, false, 1);
} else {
// Make sure we didn't specify a manager for a non-versionable connection (i.e. config)
verify(!_manager);
@@ -486,8 +486,8 @@ void ShardConnection::kill() {
}
}
-void ShardConnection::checkMyConnectionVersions(OperationContext* txn, const string& ns) {
- ClientConnections::threadInstance()->checkVersions(txn, ns);
+void ShardConnection::checkMyConnectionVersions(OperationContext* opCtx, const string& ns) {
+ ClientConnections::threadInstance()->checkVersions(opCtx, ns);
}
void ShardConnection::releaseMyConnections() {