summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/collection_bulk_loader_impl.cpp
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2019-02-05 13:05:27 -0500
committerLouis Williams <louis.williams@mongodb.com>2019-02-12 13:15:24 +1100
commit7defb111584754daefece019f9045e1f0e1811ef (patch)
tree31c63fcffcdd8a6eaf4e5c614eeef54d381224a2 /src/mongo/db/repl/collection_bulk_loader_impl.cpp
parente4f593b3dee7808d27c9db54c517ab198f5d9f89 (diff)
downloadmongo-7defb111584754daefece019f9045e1f0e1811ef.tar.gz
SERVER-39068 Replicate startIndexBuild and commitIndexBuild oplog entrires
Diffstat (limited to 'src/mongo/db/repl/collection_bulk_loader_impl.cpp')
-rw-r--r--src/mongo/db/repl/collection_bulk_loader_impl.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/db/repl/collection_bulk_loader_impl.cpp b/src/mongo/db/repl/collection_bulk_loader_impl.cpp
index f29692a1f0a..d8453e28a8d 100644
--- a/src/mongo/db/repl/collection_bulk_loader_impl.cpp
+++ b/src/mongo/db/repl/collection_bulk_loader_impl.cpp
@@ -86,7 +86,8 @@ Status CollectionBulkLoaderImpl::init(const std::vector<BSONObj>& secondaryIndex
auto specs = indexCatalog->removeExistingIndexes(_opCtx.get(), secondaryIndexSpecs);
if (specs.size()) {
_secondaryIndexesBlock->ignoreUniqueConstraint();
- auto status = _secondaryIndexesBlock->init(specs).getStatus();
+ auto status =
+ _secondaryIndexesBlock->init(specs, MultiIndexBlock::kNoopOnInitFn).getStatus();
if (!status.isOK()) {
return status;
}
@@ -94,7 +95,8 @@ Status CollectionBulkLoaderImpl::init(const std::vector<BSONObj>& secondaryIndex
_secondaryIndexesBlock.reset();
}
if (!_idIndexSpec.isEmpty()) {
- auto status = _idIndexBlock->init(_idIndexSpec).getStatus();
+ auto status =
+ _idIndexBlock->init(_idIndexSpec, MultiIndexBlock::kNoopOnInitFn).getStatus();
if (!status.isOK()) {
return status;
}
@@ -176,7 +178,8 @@ Status CollectionBulkLoaderImpl::commit() {
status = writeConflictRetry(
_opCtx.get(), "CollectionBulkLoaderImpl::commit", _nss.ns(), [this] {
WriteUnitOfWork wunit(_opCtx.get());
- auto status = _secondaryIndexesBlock->commit();
+ auto status = _secondaryIndexesBlock->commit(
+ MultiIndexBlock::kNoopOnCreateEachFn, MultiIndexBlock::kNoopOnCommitFn);
if (!status.isOK()) {
return status;
}
@@ -202,7 +205,8 @@ Status CollectionBulkLoaderImpl::commit() {
status = writeConflictRetry(
_opCtx.get(), "CollectionBulkLoaderImpl::commit", _nss.ns(), [this] {
WriteUnitOfWork wunit(_opCtx.get());
- auto status = _idIndexBlock->commit();
+ auto status = _idIndexBlock->commit(MultiIndexBlock::kNoopOnCreateEachFn,
+ MultiIndexBlock::kNoopOnCommitFn);
if (!status.isOK()) {
return status;
}