summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/update.cpp
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@10gen.com>2017-03-03 11:25:44 -0500
committerMatthew Russotto <matthew.russotto@10gen.com>2017-03-06 09:57:40 -0500
commitbefb3ab22daa1f6e0db54af4caa426cfca1b7cd2 (patch)
treed2c205c6a4a7dc9e85d47de281d35a3098ffc5b5 /src/mongo/db/exec/update.cpp
parent02501866c2fbccf5cec59c8103686972e8e7bb15 (diff)
downloadmongo-befb3ab22daa1f6e0db54af4caa426cfca1b7cd2.tar.gz
SERVER-26965 Use RAII type for turning off replicated writes.
Diffstat (limited to 'src/mongo/db/exec/update.cpp')
-rw-r--r--src/mongo/db/exec/update.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/exec/update.cpp b/src/mongo/db/exec/update.cpp
index b5dbe6eff99..a1b43a2e21d 100644
--- a/src/mongo/db/exec/update.cpp
+++ b/src/mongo/db/exec/update.cpp
@@ -1003,7 +1003,7 @@ Status UpdateStage::restoreUpdateState() {
// We may have stepped down during the yield.
bool userInitiatedWritesAndNotPrimary = getOpCtx()->writesAreReplicated() &&
- !repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(nsString);
+ !repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(getOpCtx(), nsString);
if (userInitiatedWritesAndNotPrimary) {
return Status(ErrorCodes::PrimarySteppedDown,