summaryrefslogtreecommitdiff
path: root/src/mongo
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-11-02 19:08:40 +0000
commitc7a51b83a71f76338bae5c7b2c013caf15b798a3 (patch)
tree7bb65e57c4d1b5b8e06ef746170be323e65d8f00 /src/mongo
parentb47031ed346055373ff2c852c51afad2e6e5ee4e (diff)
downloadmongo-c7a51b83a71f76338bae5c7b2c013caf15b798a3.tar.gz
SERVER-60869 Re-add logic to set feature compatibility version on arbiters
(cherry picked from commit f094005b0b8a878bc039ddae540b8696f70848f7)
Diffstat (limited to 'src/mongo')
-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 e9893df98e4..376661d929e 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -4301,6 +4301,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(
+ FeatureCompatibilityParams::kLatest);
+ }
+
_memberState = newState;
_cancelAndRescheduleElectionTimeout_inlock();