summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/create_indexes.cpp
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@10gen.com>2017-03-06 17:51:17 -0500
committerMatthew Russotto <matthew.russotto@10gen.com>2017-03-06 17:51:17 -0500
commit3e5314c3f2be49666ca5d7aa766c934ba7d6cbe9 (patch)
tree33b65bce922be15c8aed1e423ea5a3061ad1ff2b /src/mongo/db/commands/create_indexes.cpp
parentb078623660b1f4582cbb90998f8e6c252d3bd7b8 (diff)
downloadmongo-3e5314c3f2be49666ca5d7aa766c934ba7d6cbe9.tar.gz
Revert "SERVER-26965 Use RAII type for turning off replicated writes."
This reverts commit befb3ab22daa1f6e0db54af4caa426cfca1b7cd2.
Diffstat (limited to 'src/mongo/db/commands/create_indexes.cpp')
-rw-r--r--src/mongo/db/commands/create_indexes.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp
index 681370348ce..4a1707b9124 100644
--- a/src/mongo/db/commands/create_indexes.cpp
+++ b/src/mongo/db/commands/create_indexes.cpp
@@ -248,7 +248,7 @@ public:
// Note: createIndexes command does not currently respect shard versioning.
ScopedTransaction transaction(txn, MODE_IX);
Lock::DBLock dbLock(txn->lockState(), ns.db(), MODE_X);
- if (!repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(txn, ns)) {
+ if (!repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(ns)) {
return appendCommandStatus(
result,
Status(ErrorCodes::NotMaster,
@@ -334,7 +334,7 @@ public:
if (indexer.getBuildInBackground()) {
txn->recoveryUnit()->abandonSnapshot();
dbLock.relockWithMode(MODE_IX);
- if (!repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(txn, ns)) {
+ if (!repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(ns)) {
return appendCommandStatus(
result,
Status(ErrorCodes::NotMaster,
@@ -356,7 +356,7 @@ public:
// that day, to avoid data corruption due to lack of index cleanup.
txn->recoveryUnit()->abandonSnapshot();
dbLock.relockWithMode(MODE_X);
- if (!repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(txn, ns)) {
+ if (!repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(ns)) {
return appendCommandStatus(
result,
Status(ErrorCodes::NotMaster,
@@ -378,7 +378,7 @@ public:
dbLock.relockWithMode(MODE_X);
uassert(ErrorCodes::NotMaster,
str::stream() << "Not primary while completing index build in " << dbname,
- repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(txn, ns));
+ repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(ns));
Database* db = dbHolder().get(txn, ns.db());
uassert(28551, "database dropped during index build", db);