summaryrefslogtreecommitdiff
path: root/src
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 15:42:54 +0000
commit29497d3d585581d97bd28e90d995f14470cc9b93 (patch)
treebb60a5271ca9a53feedff0f53f6dc3e349fba02c /src
parent6dbb7b17909ffd00a54c0e762b6ddfc785e64ba1 (diff)
downloadmongo-29497d3d585581d97bd28e90d995f14470cc9b93.tar.gz
SERVER-60869 Re-add logic to set feature compatibility version on arbitersr5.1.0-rc3
(cherry picked from commit f094005b0b8a878bc039ddae540b8696f70848f7)
Diffstat (limited to 'src')
-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 edd4a533241..a39a9dd61db 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -4345,6 +4345,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();