diff options
Diffstat (limited to 'src/mongo/db/catalog/collection_impl.cpp')
-rw-r--r-- | src/mongo/db/catalog/collection_impl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/collection_impl.cpp b/src/mongo/db/catalog/collection_impl.cpp index 587b2e30b80..5ea64a3efcb 100644 --- a/src/mongo/db/catalog/collection_impl.cpp +++ b/src/mongo/db/catalog/collection_impl.cpp @@ -110,6 +110,8 @@ MONGO_FAIL_POINT_DEFINE(allowSettingMalformedCollectionValidators); // This fail point introduces corruption to documents during insert. MONGO_FAIL_POINT_DEFINE(corruptDocumentOnInsert); +MONGO_FAIL_POINT_DEFINE(skipCappedDeletes); + /** * Checks the 'failCollectionInserts' fail point at the beginning of an insert operation to see if * the insert should fail. Returns Status::OK if The function should proceed with the insertion. @@ -831,6 +833,10 @@ Status CollectionImpl::_insertDocuments(OperationContext* opCtx, } bool CollectionImpl::_cappedAndNeedDelete(OperationContext* opCtx) const { + if (MONGO_unlikely(skipCappedDeletes.shouldFail())) { + return false; + } + if (!isCapped()) { return false; } |