diff options
author | Benety Goh <benety@mongodb.com> | 2018-10-12 09:37:57 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2018-10-12 09:37:57 -0400 |
commit | 65eced031a2c8d8b1c5e5815881466b8fbb3bc01 (patch) | |
tree | 7b44213a602fb20a72e63b56c84c342f71b2da52 /src/mongo/dbtests/indexupdatetests.cpp | |
parent | ae2b60fce624cd9f4a95037316033b53846be176 (diff) | |
download | mongo-65eced031a2c8d8b1c5e5815881466b8fbb3bc01.tar.gz |
SERVER-36889 unshim MultiIndexBlock
Diffstat (limited to 'src/mongo/dbtests/indexupdatetests.cpp')
-rw-r--r-- | src/mongo/dbtests/indexupdatetests.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mongo/dbtests/indexupdatetests.cpp b/src/mongo/dbtests/indexupdatetests.cpp index ea318ad9728..c7cfe904772 100644 --- a/src/mongo/dbtests/indexupdatetests.cpp +++ b/src/mongo/dbtests/indexupdatetests.cpp @@ -34,7 +34,7 @@ #include "mongo/db/catalog/collection.h" #include "mongo/db/catalog/index_catalog.h" -#include "mongo/db/catalog/index_create.h" +#include "mongo/db/catalog/multi_index_block.h" #include "mongo/db/client.h" #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" @@ -74,7 +74,8 @@ protected: bool buildIndexInterrupted(const BSONObj& key, bool allowInterruption) { try { - MultiIndexBlock indexer(&_opCtx, collection()); + auto indexerPtr = collection()->createMultiIndexBlock(&_opCtx); + MultiIndexBlock& indexer(*indexerPtr); if (allowInterruption) indexer.allowInterruption(); @@ -127,7 +128,8 @@ public: wunit.commit(); } - MultiIndexBlock indexer(&_opCtx, coll); + auto indexerPtr = coll->createMultiIndexBlock(&_opCtx); + MultiIndexBlock& indexer(*indexerPtr); indexer.allowBackgroundBuilding(); indexer.allowInterruption(); indexer.ignoreUniqueConstraint(); @@ -183,7 +185,8 @@ public: wunit.commit(); } - MultiIndexBlock indexer(&_opCtx, coll); + auto indexerPtr = coll->createMultiIndexBlock(&_opCtx); + MultiIndexBlock& indexer(*indexerPtr); indexer.allowBackgroundBuilding(); indexer.allowInterruption(); // indexer.ignoreUniqueConstraint(); // not calling this @@ -369,7 +372,8 @@ public: }; Status IndexBuildBase::createIndex(const std::string& dbname, const BSONObj& indexSpec) { - MultiIndexBlock indexer(&_opCtx, collection()); + auto indexerPtr = collection()->createMultiIndexBlock(&_opCtx); + MultiIndexBlock& indexer(*indexerPtr); Status status = indexer.init(indexSpec).getStatus(); if (status == ErrorCodes::IndexAlreadyExists) { return Status::OK(); |