summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/indexupdatetests.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2018-10-26 05:59:28 -0400
committerBenety Goh <benety@mongodb.com>2018-10-26 05:59:28 -0400
commit8fe142c376ae279e99ddae7547a8f7cd4e0ce5e3 (patch)
treeafa7004080a1ed005e90eba0650767eca8519056 /src/mongo/dbtests/indexupdatetests.cpp
parentdad93d8c43636615e957f66050f0488ab0a525d4 (diff)
downloadmongo-8fe142c376ae279e99ddae7547a8f7cd4e0ce5e3.tar.gz
SERVER-37589 add library for MultiIndexBlock
Diffstat (limited to 'src/mongo/dbtests/indexupdatetests.cpp')
-rw-r--r--src/mongo/dbtests/indexupdatetests.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mongo/dbtests/indexupdatetests.cpp b/src/mongo/dbtests/indexupdatetests.cpp
index de468427c54..c3d5a62607b 100644
--- a/src/mongo/dbtests/indexupdatetests.cpp
+++ b/src/mongo/dbtests/indexupdatetests.cpp
@@ -37,6 +37,7 @@
#include "mongo/db/catalog/collection.h"
#include "mongo/db/catalog/index_catalog.h"
#include "mongo/db/catalog/multi_index_block.h"
+#include "mongo/db/catalog/multi_index_block_impl.h"
#include "mongo/db/client.h"
#include "mongo/db/db_raii.h"
#include "mongo/db/dbdirectclient.h"
@@ -76,8 +77,7 @@ protected:
bool buildIndexInterrupted(const BSONObj& key, bool allowInterruption) {
try {
- auto indexerPtr = collection()->createMultiIndexBlock(&_opCtx);
- MultiIndexBlock& indexer(*indexerPtr);
+ MultiIndexBlockImpl indexer(&_opCtx, collection());
if (allowInterruption)
indexer.allowInterruption();
@@ -130,8 +130,7 @@ public:
wunit.commit();
}
- auto indexerPtr = coll->createMultiIndexBlock(&_opCtx);
- MultiIndexBlock& indexer(*indexerPtr);
+ MultiIndexBlockImpl indexer(&_opCtx, coll);
indexer.allowBackgroundBuilding();
indexer.allowInterruption();
indexer.ignoreUniqueConstraint();
@@ -187,8 +186,7 @@ public:
wunit.commit();
}
- auto indexerPtr = coll->createMultiIndexBlock(&_opCtx);
- MultiIndexBlock& indexer(*indexerPtr);
+ MultiIndexBlockImpl indexer(&_opCtx, coll);
indexer.allowBackgroundBuilding();
indexer.allowInterruption();
// indexer.ignoreUniqueConstraint(); // not calling this
@@ -374,8 +372,7 @@ public:
};
Status IndexBuildBase::createIndex(const std::string& dbname, const BSONObj& indexSpec) {
- auto indexerPtr = collection()->createMultiIndexBlock(&_opCtx);
- MultiIndexBlock& indexer(*indexerPtr);
+ MultiIndexBlockImpl indexer(&_opCtx, collection());
Status status = indexer.init(indexSpec).getStatus();
if (status == ErrorCodes::IndexAlreadyExists) {
return Status::OK();