diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2017-08-09 14:44:24 -0400 |
---|---|---|
committer | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2017-08-09 14:44:33 -0400 |
commit | 336e2bd92d020f4e2f273fa02c388ff1305f89f2 (patch) | |
tree | bd8996b49a33eaf9565b633ddd6f93e6419f064d /src/mongo/db/repl/idempotency_test_fixture.cpp | |
parent | 60ca5426e3903775654c12f874828baf24e05b13 (diff) | |
download | mongo-336e2bd92d020f4e2f273fa02c388ff1305f89f2.tar.gz |
SERVER-30352 Add a new class that will keep track of the index inconsistencies during validation
Diffstat (limited to 'src/mongo/db/repl/idempotency_test_fixture.cpp')
-rw-r--r-- | src/mongo/db/repl/idempotency_test_fixture.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/repl/idempotency_test_fixture.cpp b/src/mongo/db/repl/idempotency_test_fixture.cpp index d4848b36ba2..579d00487d5 100644 --- a/src/mongo/db/repl/idempotency_test_fixture.cpp +++ b/src/mongo/db/repl/idempotency_test_fixture.cpp @@ -282,7 +282,10 @@ CollectionState IdempotencyTest::validate() { ValidateResults validateResults; BSONObjBuilder bob; - ASSERT_OK(collection->validate(_opCtx.get(), kValidateFull, &validateResults, &bob)); + Lock::DBLock lk(_opCtx.get(), nss.db(), MODE_IX); + auto lock = stdx::make_unique<Lock::CollectionLock>(_opCtx->lockState(), nss.ns(), MODE_X); + ASSERT_OK(collection->validate( + _opCtx.get(), kValidateFull, false, std::move(lock), &validateResults, &bob)); ASSERT_TRUE(validateResults.valid); IndexDescriptor* desc = collection->getIndexCatalog()->findIdIndex(_opCtx.get()); |