Skip to content

Commit 9ff4ff4

Browse files
author
matt dannenberg
committed
Revert "SERVER-14458 swap LegacyReplicationCoordinator for the HybridReplicationCoordinator"
This reverts commit 249c0a5.
1 parent 37f2a1e commit 9ff4ff4

File tree

4 files changed

+15
-428
lines changed

4 files changed

+15
-428
lines changed

src/mongo/SConscript

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,6 @@ serverOnlyFiles = [ "db/curop.cpp",
575575
"db/repl/rs.cpp",
576576
"db/repl/consensus.cpp",
577577
"db/repl/rs_initiate.cpp",
578-
"db/repl/repl_coordinator_hybrid.cpp",
579578
"db/repl/repl_coordinator_legacy.cpp",
580579
"db/repl/repl_set_seed_list.cpp",
581580
"db/repl/repl_set_health_poll_task.cpp",

src/mongo/db/db.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
#include "mongo/db/repair_database.h"
7171
#include "mongo/db/repl/network_interface_impl.h"
7272
#include "mongo/db/repl/repl_coordinator_global.h"
73-
#include "mongo/db/repl/repl_coordinator_hybrid.h"
7473
#include "mongo/db/repl/repl_coordinator_impl.h"
74+
#include "mongo/db/repl/repl_coordinator_legacy.h"
7575
#include "mongo/db/repl/repl_settings.h"
7676
#include "mongo/db/repl/rs.h"
7777
#include "mongo/db/repl/topology_coordinator_impl.h"
@@ -827,6 +827,12 @@ MONGO_INITIALIZER(SetGlobalConfigExperiment)(InitializerContext* context) {
827827
return Status::OK();
828828
}
829829

830+
namespace {
831+
// TODO(spencer): Remove this startup parameter once the new ReplicationCoordinator is fully
832+
// working
833+
MONGO_EXPORT_STARTUP_SERVER_PARAMETER(useNewReplCoordinator, bool, false);
834+
} // namespace
835+
830836
namespace {
831837
repl::ReplSettings replSettings;
832838
} // namespace
@@ -837,8 +843,14 @@ namespace mongo {
837843
}
838844
} // namespace mongo
839845

840-
MONGO_INITIALIZER(CreateReplicationManager)(InitializerContext* context) {
841-
repl::setGlobalReplicationCoordinator(new repl::HybridReplicationCoordinator(replSettings));
846+
MONGO_INITIALIZER(CreateReplicationCoordinator)(InitializerContext* context) {
847+
if (useNewReplCoordinator) {
848+
repl::setGlobalReplicationCoordinator(
849+
new repl::ReplicationCoordinatorImpl(replSettings));
850+
} else {
851+
repl::setGlobalReplicationCoordinator(
852+
new repl::LegacyReplicationCoordinator(replSettings));
853+
}
842854
return Status::OK();
843855
}
844856

src/mongo/db/repl/repl_coordinator_hybrid.cpp

Lines changed: 0 additions & 279 deletions
This file was deleted.

0 commit comments

Comments
 (0)