summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/idempotency_test_fixture.cpp
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2017-08-09 14:44:24 -0400
committerGregory Wlodarek <gregory.wlodarek@mongodb.com>2017-08-09 14:44:33 -0400
commit336e2bd92d020f4e2f273fa02c388ff1305f89f2 (patch)
treebd8996b49a33eaf9565b633ddd6f93e6419f064d /src/mongo/db/repl/idempotency_test_fixture.cpp
parent60ca5426e3903775654c12f874828baf24e05b13 (diff)
downloadmongo-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.cpp5
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());