diff options
Diffstat (limited to 'src/mongo/db/repl/collection_bulk_loader_impl.h')
-rw-r--r-- | src/mongo/db/repl/collection_bulk_loader_impl.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/repl/collection_bulk_loader_impl.h b/src/mongo/db/repl/collection_bulk_loader_impl.h index 5e03fcbda5d..afb6df03bc2 100644 --- a/src/mongo/db/repl/collection_bulk_loader_impl.h +++ b/src/mongo/db/repl/collection_bulk_loader_impl.h @@ -84,6 +84,20 @@ private: Status _runTaskReleaseResourcesOnFailure(const F& task) noexcept; /** + * For capped collections, each document will be inserted in its own WriteUnitOfWork. + */ + Status _insertDocumentsForCappedCollection(const std::vector<BSONObj>::const_iterator begin, + const std::vector<BSONObj>::const_iterator end); + + /** + * For uncapped collections, we will insert documents in batches of size + * collectionBulkLoaderBatchSizeInBytes or up to one document size greater. All insertions in a + * given batch will be inserted in one WriteUnitOfWork. + */ + Status _insertDocumentsForUncappedCollection(const std::vector<BSONObj>::const_iterator begin, + const std::vector<BSONObj>::const_iterator end); + + /** * Adds document and associated RecordId to index blocks after inserting into RecordStore. */ Status _addDocumentToIndexBlocks(const BSONObj& doc, const RecordId& loc); |