summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2017-05-01 14:34:14 -0400
committerMaria van Keulen <maria@mongodb.com>2017-05-04 16:14:37 -0400
commit67b8dfc2beb283b08f2549df4d99730325ee5de2 (patch)
tree0d6ee895c94f6402318f35ce6d930075fd62e260 /src
parent9075734cd9ab2a4caafbec75b22d2c4b11b7ba36 (diff)
downloadmongo-67b8dfc2beb283b08f2549df4d99730325ee5de2.tar.gz
SERVER-28907 Fix hidden argument warnings caused by opCtx rename
This commit resolves variable name conflicts introduced by the txn to opCtx rename in commit 589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79.
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/commands/current_op.cpp16
-rw-r--r--src/mongo/db/commands/kill_op.cpp6
-rw-r--r--src/mongo/db/commands/lock_info.cpp8
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp6
-rw-r--r--src/mongo/db/stats/lock_server_status_section.cpp5
5 files changed, 21 insertions, 20 deletions
diff --git a/src/mongo/db/commands/current_op.cpp b/src/mongo/db/commands/current_op.cpp
index 0467e69b81a..fd69d1c06a9 100644
--- a/src/mongo/db/commands/current_op.cpp
+++ b/src/mongo/db/commands/current_op.cpp
@@ -130,11 +130,11 @@ public:
continue;
}
- const OperationContext* opCtx = client->getOperationContext();
+ const OperationContext* clientOpCtx = client->getOperationContext();
if (!includeAll) {
// Skip over inactive connections.
- if (!opCtx)
+ if (!clientOpCtx)
continue;
}
@@ -153,18 +153,18 @@ public:
}
// Operation context specific information
- infoBuilder.appendBool("active", static_cast<bool>(opCtx));
- if (opCtx) {
- infoBuilder.append("opid", opCtx->getOpID());
- if (opCtx->isKillPending()) {
+ infoBuilder.appendBool("active", static_cast<bool>(clientOpCtx));
+ if (clientOpCtx) {
+ infoBuilder.append("opid", clientOpCtx->getOpID());
+ if (clientOpCtx->isKillPending()) {
infoBuilder.append("killPending", true);
}
- CurOp::get(opCtx)->reportState(&infoBuilder);
+ CurOp::get(clientOpCtx)->reportState(&infoBuilder);
// LockState
Locker::LockerInfo lockerInfo;
- opCtx->lockState()->getLockerInfo(&lockerInfo);
+ clientOpCtx->lockState()->getLockerInfo(&lockerInfo);
fillLockerInfo(lockerInfo, infoBuilder);
}
diff --git a/src/mongo/db/commands/kill_op.cpp b/src/mongo/db/commands/kill_op.cpp
index f76159b0adf..6a6d4603443 100644
--- a/src/mongo/db/commands/kill_op.cpp
+++ b/src/mongo/db/commands/kill_op.cpp
@@ -140,9 +140,9 @@ public:
auto swLkAndOp = _findOp(opCtx->getClient(), opId);
if (swLkAndOp.isOK()) {
stdx::unique_lock<Client> lk;
- OperationContext* opCtx;
- std::tie(lk, opCtx) = std::move(swLkAndOp.getValue());
- opCtx->getServiceContext()->killOperation(opCtx);
+ OperationContext* opCtxToKill;
+ std::tie(lk, opCtxToKill) = std::move(swLkAndOp.getValue());
+ opCtx->getServiceContext()->killOperation(opCtxToKill);
}
return true;
diff --git a/src/mongo/db/commands/lock_info.cpp b/src/mongo/db/commands/lock_info.cpp
index 1a118b80fc3..3bb198f78f4 100644
--- a/src/mongo/db/commands/lock_info.cpp
+++ b/src/mongo/db/commands/lock_info.cpp
@@ -91,16 +91,16 @@ public:
invariant(client);
stdx::lock_guard<Client> lk(*client);
- const OperationContext* opCtx = client->getOperationContext();
+ const OperationContext* clientOpCtx = client->getOperationContext();
// Operation context specific information
- if (opCtx) {
+ if (clientOpCtx) {
BSONObjBuilder infoBuilder;
// The client information
client->reportState(infoBuilder);
- infoBuilder.append("opid", opCtx->getOpID());
- LockerId lockerId = opCtx->lockState()->getId();
+ infoBuilder.append("opid", clientOpCtx->getOpID());
+ LockerId lockerId = clientOpCtx->lockState()->getId();
lockToClientMap.insert({lockerId, infoBuilder.obj()});
}
}
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index 4eb100e6de7..cb1af53a07c 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -637,9 +637,9 @@ void ReplicationCoordinatorImpl::_startDataReplication(OperationContext* opCtx,
startCompleted();
}
// Repair local db (to compact it).
- auto opCtx = cc().makeOperationContext();
- uassertStatusOK(_externalState->runRepairOnLocalDB(opCtx.get()));
- _externalState->startSteadyStateReplication(opCtx.get(), this);
+ auto opCtxHolder = cc().makeOperationContext();
+ uassertStatusOK(_externalState->runRepairOnLocalDB(opCtxHolder.get()));
+ _externalState->startSteadyStateReplication(opCtxHolder.get(), this);
};
std::shared_ptr<InitialSyncer> initialSyncerCopy;
diff --git a/src/mongo/db/stats/lock_server_status_section.cpp b/src/mongo/db/stats/lock_server_status_section.cpp
index 7884259ac4f..2eed080ef99 100644
--- a/src/mongo/db/stats/lock_server_status_section.cpp
+++ b/src/mongo/db/stats/lock_server_status_section.cpp
@@ -59,8 +59,9 @@ public:
invariant(client);
stdx::unique_lock<Client> uniqueLock(*client);
- const OperationContext* opCtx = client->getOperationContext();
- auto state = opCtx ? opCtx->lockState()->getClientState() : Locker::kInactive;
+ const OperationContext* clientOpCtx = client->getOperationContext();
+ auto state =
+ clientOpCtx ? clientOpCtx->lockState()->getClientState() : Locker::kInactive;
invariant(state < sizeof(clientStatusCounts));
clientStatusCounts[state]++;
}