diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2020-09-14 09:16:11 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-09-15 18:42:42 +0000 |
commit | a13aa67e179d3400bb8a61a8a995f601d97336be (patch) | |
tree | faf9babb1384c0584201f4cf6db865ffe5998798 /src/mongo/dbtests/indexupdatetests.cpp | |
parent | 46a7656f3c4805dc6ffff32573886b00a4e63888 (diff) | |
download | mongo-a13aa67e179d3400bb8a61a8a995f601d97336be.tar.gz |
SERVER-50928 Remove IndexCatalog* stored in IndexBuildBlock
It can go stale when we perform copy-on-write on the Collection.
Pass in current Collection where it is needed.
Diffstat (limited to 'src/mongo/dbtests/indexupdatetests.cpp')
-rw-r--r-- | src/mongo/dbtests/indexupdatetests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/dbtests/indexupdatetests.cpp b/src/mongo/dbtests/indexupdatetests.cpp index 007b491d6b1..83ba1ca2541 100644 --- a/src/mongo/dbtests/indexupdatetests.cpp +++ b/src/mongo/dbtests/indexupdatetests.cpp @@ -165,7 +165,7 @@ public: ASSERT_OK(indexer.init(_opCtx, coll, spec, MultiIndexBlock::kNoopOnInitFn).getStatus()); ASSERT_OK(indexer.insertAllDocumentsInCollection(_opCtx, coll.get())); - ASSERT_OK(indexer.checkConstraints(_opCtx)); + ASSERT_OK(indexer.checkConstraints(_opCtx, coll.get())); WriteUnitOfWork wunit(_opCtx); ASSERT_OK(indexer.commit(_opCtx, @@ -226,7 +226,7 @@ public: // Hybrid index builds check duplicates explicitly. ASSERT_OK(indexer.insertAllDocumentsInCollection(_opCtx, coll.get())); - auto status = indexer.checkConstraints(_opCtx); + auto status = indexer.checkConstraints(_opCtx, coll.get()); ASSERT_EQUALS(status.code(), ErrorCodes::DuplicateKey); } }; @@ -343,7 +343,7 @@ Status IndexBuildBase::createIndex(const BSONObj& indexSpec) { if (!status.isOK()) { return status; } - status = indexer.checkConstraints(_opCtx); + status = indexer.checkConstraints(_opCtx, collection().get()); if (!status.isOK()) { return status; } |