summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl
diff options
context:
space:
mode:
authorali-mir <ali.mir@mongodb.com>2021-10-25 16:56:41 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-25 17:19:55 +0000
commitf094005b0b8a878bc039ddae540b8696f70848f7 (patch)
tree2a17baedc6edcb82a497d0331e6c14600fcd2309 /src/mongo/db/repl
parent0d1009d3594f080a0b050698fd6fc4fd909049a2 (diff)
downloadmongo-f094005b0b8a878bc039ddae540b8696f70848f7.tar.gz
SERVER-60869 Re-add logic to set feature compatibility version on arbiters
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index 87d8c31b5c4..c3c67f39cb2 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -4347,6 +4347,15 @@ ReplicationCoordinatorImpl::_updateMemberStateFromTopologyCoordinator(WithLock l
"Replica set state transition",
"newState"_attr = newState,
"oldState"_attr = _memberState);
+
+ // Initializes the featureCompatibilityVersion to the latest value, because arbiters do not
+ // receive the replicated version. This is to avoid bugs like SERVER-32639.
+ if (newState.arbiter()) {
+ // (Generic FCV reference): This FCV check should exist across LTS binary versions.
+ serverGlobalParams.mutableFeatureCompatibility.setVersion(
+ multiversion::GenericFCV::kLatest);
+ }
+
_memberState = newState;
_cancelAndRescheduleElectionTimeout_inlock();