diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2021-01-20 08:41:40 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-21 01:41:03 +0000 |
commit | a083e8eb752096f849f847964cc764e662b8d4cf (patch) | |
tree | 018d4bff4b23522620bf706d8c518c2324a9b01a /src/mongo | |
parent | e9fe1170a7ad389c3b14a36550aec784098750fd (diff) | |
download | mongo-a083e8eb752096f849f847964cc764e662b8d4cf.tar.gz |
SERVER-53902 Fix crash in op_msg_fuzzer when looking for the oplog.
Initialize the repl coordinator in standalone instead of 1-node replica set.
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/op_msg_fuzzer_fixture.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/op_msg_fuzzer_fixture.cpp b/src/mongo/db/op_msg_fuzzer_fixture.cpp index 758d3ea4f70..54e53e7432f 100644 --- a/src/mongo/db/op_msg_fuzzer_fixture.cpp +++ b/src/mongo/db/op_msg_fuzzer_fixture.cpp @@ -88,9 +88,10 @@ OpMsgFuzzerFixture::OpMsgFuzzerFixture(bool skipGlobalInitializers) { AuthorizationManager::set(_serviceContext, std::move(localAuthzManager)); - auto replCoord = std::make_unique<repl::ReplicationCoordinatorMock>(_serviceContext); - invariant(replCoord->setFollowerMode(repl::MemberState::RS_PRIMARY)); - repl::ReplicationCoordinator::set(_serviceContext, std::move(replCoord)); + // Setup the repl coordinator in standalone mode so we don't need an oplog etc. + repl::ReplicationCoordinator::set( + _serviceContext, + std::make_unique<repl::ReplicationCoordinatorMock>(_serviceContext, repl::ReplSettings())); } int OpMsgFuzzerFixture::testOneInput(const char* Data, size_t Size) { |