summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/dbcommands.cpp
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2017-12-15 11:33:30 -0500
committerHenrik Edin <henrik.edin@mongodb.com>2018-01-22 13:51:26 -0500
commitc376f4b80d26028b6a8746f8545a35e390b59bf2 (patch)
treebffed1afdcc737dcbc899af35c84ccd6cbc4d100 /src/mongo/db/commands/dbcommands.cpp
parent50921266423bf59267b08e0f8ee23469ea03d768 (diff)
downloadmongo-c376f4b80d26028b6a8746f8545a35e390b59bf2.tar.gz
SERVER-29519 Removed many usages of getGlobalReplicationCoordinator
Diffstat (limited to 'src/mongo/db/commands/dbcommands.cpp')
-rw-r--r--src/mongo/db/commands/dbcommands.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp
index c71161bcb2b..8e63f8f2137 100644
--- a/src/mongo/db/commands/dbcommands.cpp
+++ b/src/mongo/db/commands/dbcommands.cpp
@@ -129,7 +129,7 @@ public:
timeoutSecs = cmdObj["timeoutSecs"].numberLong();
}
- Status status = repl::getGlobalReplicationCoordinator()->stepDown(
+ Status status = repl::ReplicationCoordinator::get(opCtx)->stepDown(
opCtx, force, Seconds(timeoutSecs), Seconds(120));
if (!status.isOK() && status.code() != ErrorCodes::NotMaster) { // ignore not master
return CommandHelpers::appendCommandStatus(result, status);
@@ -180,7 +180,7 @@ public:
"with --configsvr"));
}
- if ((repl::getGlobalReplicationCoordinator()->getReplicationMode() !=
+ if ((repl::ReplicationCoordinator::get(opCtx)->getReplicationMode() !=
repl::ReplicationCoordinator::modeNone) &&
((dbname == NamespaceString::kLocalDb) || (dbname == NamespaceString::kAdminDb))) {
return CommandHelpers::appendCommandStatus(
@@ -430,7 +430,7 @@ public:
return false;
}
- if ((repl::getGlobalReplicationCoordinator()->getReplicationMode() !=
+ if ((repl::ReplicationCoordinator::get(opCtx)->getReplicationMode() !=
repl::ReplicationCoordinator::modeNone) &&
nsToDrop.isOplog()) {
errmsg = "can't drop live oplog while replicating";