summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/collection_bulk_loader_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/collection_bulk_loader_impl.h')
-rw-r--r--src/mongo/db/repl/collection_bulk_loader_impl.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mongo/db/repl/collection_bulk_loader_impl.h b/src/mongo/db/repl/collection_bulk_loader_impl.h
index d7077376478..61c2d21d6a8 100644
--- a/src/mongo/db/repl/collection_bulk_loader_impl.h
+++ b/src/mongo/db/repl/collection_bulk_loader_impl.h
@@ -62,7 +62,7 @@ public:
CollectionBulkLoaderImpl(ServiceContext::UniqueClient&& client,
ServiceContext::UniqueOperationContext&& opCtx,
- std::unique_ptr<AutoGetCollection>&& autoColl,
+ const NamespaceString& nss,
const BSONObj& idIndexSpec);
virtual ~CollectionBulkLoaderImpl();
@@ -86,7 +86,8 @@ private:
/**
* For capped collections, each document will be inserted in its own WriteUnitOfWork.
*/
- Status _insertDocumentsForCappedCollection(std::vector<BSONObj>::const_iterator begin,
+ Status _insertDocumentsForCappedCollection(const CollectionPtr& coll,
+ std::vector<BSONObj>::const_iterator begin,
std::vector<BSONObj>::const_iterator end);
/**
@@ -94,17 +95,19 @@ private:
* collectionBulkLoaderBatchSizeInBytes or up to one document size greater. All insertions in a
* given batch will be inserted in one WriteUnitOfWork.
*/
- Status _insertDocumentsForUncappedCollection(std::vector<BSONObj>::const_iterator begin,
+ Status _insertDocumentsForUncappedCollection(const CollectionPtr& coll,
+ std::vector<BSONObj>::const_iterator begin,
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);
+ Status _addDocumentToIndexBlocks(const CollectionPtr& coll,
+ const BSONObj& doc,
+ const RecordId& loc);
ServiceContext::UniqueClient _client;
ServiceContext::UniqueOperationContext _opCtx;
- std::unique_ptr<AutoGetCollection> _collection;
NamespaceString _nss;
std::unique_ptr<MultiIndexBlock> _idIndexBlock;
std::unique_ptr<MultiIndexBlock> _secondaryIndexesBlock;