summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/collection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/collection.h')
-rw-r--r--src/mongo/db/catalog/collection.h33
1 files changed, 8 insertions, 25 deletions
diff --git a/src/mongo/db/catalog/collection.h b/src/mongo/db/catalog/collection.h
index e1c68377b10..cb7417c4871 100644
--- a/src/mongo/db/catalog/collection.h
+++ b/src/mongo/db/catalog/collection.h
@@ -250,14 +250,12 @@ public:
* so should be ignored by the user as an internal maintenance operation and not a
* real delete.
* 'loc' key to uniquely identify a record in a collection.
- * 'opDebug' Optional argument. When not null, will be used to record operation statistics.
* 'cappedOK' if true, allows deletes on capped collections (Cloner::copyDB uses this).
* 'noWarn' if unindexing the record causes an error, if noWarn is true the error
* will not be logged.
*/
void deleteDocument(OperationContext* txn,
const RecordId& loc,
- OpDebug* opDebug,
bool fromMigrate = false,
bool noWarn = false);
@@ -265,13 +263,10 @@ public:
* Inserts all documents inside one WUOW.
* Caller should ensure vector is appropriately sized for this.
* If any errors occur (including WCE), caller should retry documents individually.
- *
- * 'opDebug' Optional argument. When not null, will be used to record operation statistics.
*/
Status insertDocuments(OperationContext* txn,
std::vector<BSONObj>::const_iterator begin,
std::vector<BSONObj>::const_iterator end,
- OpDebug* opDebug,
bool enforceQuota,
bool fromMigrate = false);
@@ -279,12 +274,10 @@ public:
* this does NOT modify the doc before inserting
* i.e. will not add an _id field for documents that are missing it
*
- * 'opDebug' Optional argument. When not null, will be used to record operation statistics.
- * 'enforceQuota' If false, quotas will be ignored.
+ * If enforceQuota is false, quotas will be ignored.
*/
Status insertDocument(OperationContext* txn,
const BSONObj& doc,
- OpDebug* opDebug,
bool enforceQuota,
bool fromMigrate = false);
@@ -305,7 +298,6 @@ public:
* If the document fits in the old space, it is put there; if not, it is moved.
* Sets 'args.updatedDoc' to the updated version of the document with damages applied, on
* success.
- * 'opDebug' Optional argument. When not null, will be used to record operation statistics.
* @return the post update location of the doc (may or may not be the same as oldLocation)
*/
StatusWith<RecordId> updateDocument(OperationContext* txn,
@@ -314,7 +306,7 @@ public:
const BSONObj& newDoc,
bool enforceQuota,
bool indexesAffected,
- OpDebug* opDebug,
+ OpDebug* debug,
OplogUpdateEntryArgs* args);
bool updateWithDamagesSupported() const;
@@ -445,6 +437,11 @@ private:
*/
StatusWithMatchExpression parseValidator(const BSONObj& validator) const;
+ Status recordStoreGoingToMove(OperationContext* txn,
+ const RecordId& oldLocation,
+ const char* oldBuffer,
+ size_t oldSize);
+
Status recordStoreGoingToUpdateInPlace(OperationContext* txn, const RecordId& loc);
Status aboutToDeleteCapped(OperationContext* txn, const RecordId& loc, RecordData data);
@@ -459,21 +456,7 @@ private:
Status _insertDocuments(OperationContext* txn,
std::vector<BSONObj>::const_iterator begin,
std::vector<BSONObj>::const_iterator end,
- bool enforceQuota,
- OpDebug* opDebug);
-
-
- /**
- * Perform update when document move will be required.
- */
- StatusWith<RecordId> _updateDocumentWithMove(OperationContext* txn,
- const RecordId& oldLocation,
- const Snapshotted<BSONObj>& oldDoc,
- const BSONObj& newDoc,
- bool enforceQuota,
- OpDebug* opDebug,
- OplogUpdateEntryArgs* args,
- const SnapshotId& sid);
+ bool enforceQuota);
bool _enforceQuota(bool userEnforeQuota) const;