summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/delete.cpp
diff options
context:
space:
mode:
authorJason Rassi <rassi@10gen.com>2015-08-07 17:59:38 -0400
committerJason Rassi <rassi@10gen.com>2015-08-10 12:33:42 -0400
commit5e384621d664132346df3044bb5007597faa123c (patch)
treefcaaa0a548ed0ac3d8487423c2b15e5308d02f44 /src/mongo/db/exec/delete.cpp
parent99a512ee7029d5ce20a8d3135a0f27364452255d (diff)
downloadmongo-5e384621d664132346df3044bb5007597faa123c.tar.gz
SERVER-19838 Remove member DeleteStageParams::shouldCallLogOp
Diffstat (limited to 'src/mongo/db/exec/delete.cpp')
-rw-r--r--src/mongo/db/exec/delete.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/mongo/db/exec/delete.cpp b/src/mongo/db/exec/delete.cpp
index 90b87cce6bc..1b970a475fc 100644
--- a/src/mongo/db/exec/delete.cpp
+++ b/src/mongo/db/exec/delete.cpp
@@ -179,17 +179,7 @@ PlanStage::StageState DeleteStage::work(WorkingSetID* out) {
// Do the write, unless this is an explain.
if (!_params.isExplain) {
WriteUnitOfWork wunit(getOpCtx());
-
- const bool deleteCappedOK = false;
- const bool deleteNoWarn = false;
- BSONObj deletedId;
-
- _collection->deleteDocument(getOpCtx(),
- rloc,
- deleteCappedOK,
- deleteNoWarn,
- _params.shouldCallLogOp ? &deletedId : NULL);
-
+ _collection->deleteDocument(getOpCtx(), rloc);
wunit.commit();
}
@@ -260,7 +250,7 @@ void DeleteStage::doRestoreState() {
const NamespaceString& ns(_collection->ns());
massert(28537,
str::stream() << "Demoted from primary while removing from " << ns.ns(),
- !_params.shouldCallLogOp ||
+ !getOpCtx()->writesAreReplicated() ||
repl::getGlobalReplicationCoordinator()->canAcceptWritesFor(ns));
}