diff options
author | Judah Schvimer <judah@mongodb.com> | 2018-02-13 11:42:41 -0500 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2018-02-16 09:10:21 -0500 |
commit | 97fc082fcf2abc9428de053f88967b848ba36c7f (patch) | |
tree | bcde3adfe9f07f0ccc386ea06033d7bf7064a7cd /src/mongo/db/repl/initial_syncer_test.cpp | |
parent | 8b988b2219e7d41bc0fcf5ae35dede6d658bcd9e (diff) | |
download | mongo-97fc082fcf2abc9428de053f88967b848ba36c7f.tar.gz |
SERVER-33290 secondaries must set multikey before releasing parallel batch writer mutex
Diffstat (limited to 'src/mongo/db/repl/initial_syncer_test.cpp')
-rw-r--r-- | src/mongo/db/repl/initial_syncer_test.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/mongo/db/repl/initial_syncer_test.cpp b/src/mongo/db/repl/initial_syncer_test.cpp index 630629ff7a5..2d959fb8a5c 100644 --- a/src/mongo/db/repl/initial_syncer_test.cpp +++ b/src/mongo/db/repl/initial_syncer_test.cpp @@ -3619,18 +3619,21 @@ TEST_F( const MultiApplier::Operations& ops, MultiApplier::ApplyOperationFn applyOperation) { // 'OperationPtr*' is ignored by our overridden _multiInitialSyncApply(). - applyOperation(nullptr).transitional_ignore(); + ASSERT_OK(applyOperation(nullptr, nullptr)); return ops.back().getOpTime(); }; bool fetchCountIncremented = false; - getExternalState()->multiInitialSyncApplyFn = [&fetchCountIncremented]( - MultiApplier::OperationPtrs*, const HostAndPort&, AtomicUInt32* fetchCount) { - if (!fetchCountIncremented) { - fetchCount->addAndFetch(1); - fetchCountIncremented = true; - } - return Status::OK(); - }; + getExternalState()->multiInitialSyncApplyFn = + [&fetchCountIncremented](MultiApplier::OperationPtrs*, + const HostAndPort&, + AtomicUInt32* fetchCount, + WorkerMultikeyPathInfo*) { + if (!fetchCountIncremented) { + fetchCount->addAndFetch(1); + fetchCountIncremented = true; + } + return Status::OK(); + }; _syncSourceSelector->setChooseNewSyncSourceResult_forTest(HostAndPort("localhost", 12345)); ASSERT_OK(initialSyncer->startup(opCtx.get(), maxAttempts)); |