summaryrefslogtreecommitdiff
path: root/src/mongo/db/cloner.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/cloner.cpp
parent50921266423bf59267b08e0f8ee23469ea03d768 (diff)
downloadmongo-c376f4b80d26028b6a8746f8545a35e390b59bf2.tar.gz
SERVER-29519 Removed many usages of getGlobalReplicationCoordinator
Diffstat (limited to 'src/mongo/db/cloner.cpp')
-rw-r--r--src/mongo/db/cloner.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/cloner.cpp b/src/mongo/db/cloner.cpp
index 7ab9d368df1..5dece280806 100644
--- a/src/mongo/db/cloner.cpp
+++ b/src/mongo/db/cloner.cpp
@@ -148,7 +148,7 @@ struct Cloner::Fun {
<< " to "
<< to_collection.ns(),
!opCtx->writesAreReplicated() ||
- repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(opCtx, to_collection));
+ repl::ReplicationCoordinator::get(opCtx)->canAcceptWritesFor(opCtx, to_collection));
// Make sure database still exists after we resume from the temp release
Database* db = dbHolder().openDb(opCtx, _dbName);
@@ -204,7 +204,7 @@ struct Cloner::Fun {
uassert(ErrorCodes::PrimarySteppedDown,
str::stream() << "Cannot write to ns: " << to_collection.ns()
<< " after yielding",
- repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(
+ repl::ReplicationCoordinator::get(opCtx)->canAcceptWritesFor(
opCtx, to_collection));
}
@@ -336,7 +336,7 @@ void Cloner::copy(OperationContext* opCtx,
<< " with filter "
<< query.toString(),
!opCtx->writesAreReplicated() ||
- repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(opCtx, to_collection));
+ repl::ReplicationCoordinator::get(opCtx)->canAcceptWritesFor(opCtx, to_collection));
}
void Cloner::copyIndexes(OperationContext* opCtx,
@@ -359,7 +359,7 @@ void Cloner::copyIndexes(OperationContext* opCtx,
<< to_collection.ns()
<< " (Cloner)",
!opCtx->writesAreReplicated() ||
- repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(opCtx, to_collection));
+ repl::ReplicationCoordinator::get(opCtx)->canAcceptWritesFor(opCtx, to_collection));
if (indexesToBuild.empty())
@@ -472,7 +472,7 @@ bool Cloner::copyCollection(OperationContext* opCtx,
uassert(ErrorCodes::PrimarySteppedDown,
str::stream() << "Not primary while copying collection " << ns << " (Cloner)",
!opCtx->writesAreReplicated() ||
- repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(opCtx, nss));
+ repl::ReplicationCoordinator::get(opCtx)->canAcceptWritesFor(opCtx, nss));
Database* db = dbHolder().openDb(opCtx, dbname);
@@ -714,7 +714,7 @@ Status Cloner::copyDb(OperationContext* opCtx,
str::stream() << "Not primary while cloning database " << opts.fromDB
<< " (after getting list of collections to clone)",
!opCtx->writesAreReplicated() ||
- repl::getGlobalReplicationCoordinator()->canAcceptWritesForDatabase(opCtx, toDBName));
+ repl::ReplicationCoordinator::get(opCtx)->canAcceptWritesForDatabase(opCtx, toDBName));
if (opts.syncData) {
if (opts.createCollections) {