summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2016-04-06 18:08:30 -0400
committerGeert Bosch <geert@mongodb.com>2016-04-07 18:23:29 -0400
commit64bdc59ebc42b502ed76bf215048df0082de6060 (patch)
treeec3e0be10e7b642d627de727aa4414cc3df80dcd
parent9421c0fc601a8f3ac9bbfb8ab5a5bbae88645a01 (diff)
downloadmongo-64bdc59ebc42b502ed76bf215048df0082de6060.tar.gz
SERVER-22723 Remove unused cappedOK argument from Collection::deleteDocument
-rw-r--r--src/mongo/db/catalog/collection.cpp8
-rw-r--r--src/mongo/db/catalog/collection.h1
-rw-r--r--src/mongo/db/cloner.cpp2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/catalog/collection.cpp b/src/mongo/db/catalog/collection.cpp
index 721baf85636..6e5f5a5306b 100644
--- a/src/mongo/db/catalog/collection.cpp
+++ b/src/mongo/db/catalog/collection.cpp
@@ -479,9 +479,11 @@ Status Collection::aboutToDeleteCapped(OperationContext* txn,
return Status::OK();
}
-void Collection::deleteDocument(
- OperationContext* txn, const RecordId& loc, bool fromMigrate, bool cappedOK, bool noWarn) {
- if (isCapped() && !cappedOK) {
+void Collection::deleteDocument(OperationContext* txn,
+ const RecordId& loc,
+ bool fromMigrate,
+ bool noWarn) {
+ if (isCapped()) {
log() << "failing remove on a capped ns " << _ns << endl;
uasserted(10089, "cannot remove from a capped collection");
return;
diff --git a/src/mongo/db/catalog/collection.h b/src/mongo/db/catalog/collection.h
index c98803c2698..cb7417c4871 100644
--- a/src/mongo/db/catalog/collection.h
+++ b/src/mongo/db/catalog/collection.h
@@ -257,7 +257,6 @@ public:
void deleteDocument(OperationContext* txn,
const RecordId& loc,
bool fromMigrate = false,
- bool cappedOK = false,
bool noWarn = false);
/*
diff --git a/src/mongo/db/cloner.cpp b/src/mongo/db/cloner.cpp
index db5d513fd44..cce155af8cd 100644
--- a/src/mongo/db/cloner.cpp
+++ b/src/mongo/db/cloner.cpp
@@ -611,7 +611,7 @@ Status Cloner::copyDb(OperationContext* txn,
// dupsAllowed in IndexCatalog::_unindexRecord and SERVER-17487.
for (set<RecordId>::const_iterator it = dups.begin(); it != dups.end(); ++it) {
WriteUnitOfWork wunit(txn);
- c->deleteDocument(txn, *it, false, false, true);
+ c->deleteDocument(txn, *it, false, true);
wunit.commit();
}