diff options
author | Gabriel Marks <gabriel.marks@mongodb.com> | 2022-01-04 23:12:00 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-01-04 23:41:46 +0000 |
commit | a29535aaa54d6ca2ec7f87cea34ac4138ae8803d (patch) | |
tree | 2c82ecfea8edb3975a64a73a578c21a8ea73965a /src/mongo/db/repl/all_database_cloner_test.cpp | |
parent | fdca8a8d628d5480e3f552f86ce89aa0d234741f (diff) | |
download | mongo-a29535aaa54d6ca2ec7f87cea34ac4138ae8803d.tar.gz |
SERVER-61505 Remove WireVersion::RESUMABLE_INITIAL_SYNC
Diffstat (limited to 'src/mongo/db/repl/all_database_cloner_test.cpp')
-rw-r--r-- | src/mongo/db/repl/all_database_cloner_test.cpp | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/mongo/db/repl/all_database_cloner_test.cpp b/src/mongo/db/repl/all_database_cloner_test.cpp index b77caa19e47..ad8aa737c78 100644 --- a/src/mongo/db/repl/all_database_cloner_test.cpp +++ b/src/mongo/db/repl/all_database_cloner_test.cpp @@ -295,59 +295,7 @@ TEST_F(AllDatabaseClonerTest, RetriesListDatabasesButRollBackIdChanges) { ASSERT_EQ(Minutes(60), getSharedData()->getTotalTimeUnreachable(WithLock::withoutLock())); } -TEST_F(AllDatabaseClonerTest, RetriesListDatabasesButSourceNodeIsDowngraded) { - _mockClient->setWireVersions(WireVersion::RESUMABLE_INITIAL_SYNC, - WireVersion::RESUMABLE_INITIAL_SYNC); - auto beforeStageFailPoint = globalFailPointRegistry().find("hangBeforeClonerStage"); - _mockServer->setCommandReply("replSetGetRBID", fromjson("{ok:1, rbid:1}")); - _mockServer->setCommandReply("listDatabases", fromjson("{ok:1, databases:[]}")); - - // Stop at the listDatabases stage. - auto timesEnteredBeforeStage = beforeStageFailPoint->setMode( - FailPoint::alwaysOn, 0, fromjson("{cloner: 'AllDatabaseCloner', stage: 'listDatabases'}")); - - auto cloner = makeAllDatabaseCloner(); - - // Run the cloner in a separate thread. - stdx::thread clonerThread([&] { - Client::initThread("ClonerRunner"); - ASSERT_NOT_OK(cloner->run()); - }); - - // Wait until we get to the listDatabases stage. - beforeStageFailPoint->waitForTimesEntered(timesEnteredBeforeStage + 1); - - // Bring the server down. - _mockServer->shutdown(); - - auto beforeRBIDFailPoint = - globalFailPointRegistry().find("hangBeforeCheckingRollBackIdClonerStage"); - auto timesEnteredRBID = beforeRBIDFailPoint->setMode( - FailPoint::alwaysOn, 0, fromjson("{cloner: 'AllDatabaseCloner', stage: 'listDatabases'}")); - beforeStageFailPoint->setMode(FailPoint::off, 0); - beforeRBIDFailPoint->waitForTimesEntered(timesEnteredRBID + 1); - _clock.advance(Minutes(60)); - - // Bring the server up, but change the wire version to an older one. - LOGV2(21053, "Bringing mock server back up."); - _mockClient->setWireVersions(WireVersion::SHARDED_TRANSACTIONS, - WireVersion::SHARDED_TRANSACTIONS); - _mockServer->reboot(); - - // Allow the cloner to finish. - beforeRBIDFailPoint->setMode(FailPoint::off, 0); - clonerThread.join(); - - // Total retries and outage time should be available. - ASSERT_EQ(0, getSharedData()->getRetryingOperationsCount(WithLock::withoutLock())); - ASSERT_EQ(1, getSharedData()->getTotalRetries(WithLock::withoutLock())); - ASSERT_EQ(Minutes(60), getSharedData()->getTotalTimeUnreachable(WithLock::withoutLock())); -} - TEST_F(AllDatabaseClonerTest, RetriesListDatabasesButInitialSyncIdChanges) { - // Initial Sync Ids are not checked before wire version RESUMABLE_INITIAL_SYNC. - _mockClient->setWireVersions(WireVersion::RESUMABLE_INITIAL_SYNC, - WireVersion::RESUMABLE_INITIAL_SYNC); auto beforeStageFailPoint = globalFailPointRegistry().find("hangBeforeClonerStage"); _mockServer->setCommandReply("replSetGetRBID", fromjson("{ok:1, rbid:1}")); _mockServer->setCommandReply("listDatabases", fromjson("{ok:1, databases:[]}")); |