summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp2
-rw-r--r--src/mongo/db/repl/topology_coordinator.cpp6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp b/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp
index bae99b2e5ed..66b36319c30 100644
--- a/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp
@@ -1120,7 +1120,7 @@ TEST_F(ReplCoordHBV1Test, IgnoreTheContentsOfMetadataWhenItsReplicaSetIdDoesNotM
ASSERT_TRUE(members[1].isABSONObj());
auto member = members[1].Obj();
ASSERT_EQ(host2, HostAndPort(member["name"].String()));
- ASSERT_EQ(MemberState(MemberState::RS_UNKNOWN).toString(),
+ ASSERT_EQ(MemberState(MemberState::RS_DOWN).toString(),
MemberState(member["state"].numberInt()).toString());
}
diff --git a/src/mongo/db/repl/topology_coordinator.cpp b/src/mongo/db/repl/topology_coordinator.cpp
index 181e9f5ddfc..a6fe46dcd7a 100644
--- a/src/mongo/db/repl/topology_coordinator.cpp
+++ b/src/mongo/db/repl/topology_coordinator.cpp
@@ -936,11 +936,9 @@ HeartbeatResponseAction TopologyCoordinator::processHeartbeatResponse(
invariant(hbStats.getLastHeartbeatStartDate() != Date_t());
const bool isUnauthorized = (hbResponse.getStatus().code() == ErrorCodes::Unauthorized) ||
(hbResponse.getStatus().code() == ErrorCodes::AuthenticationFailed);
- const bool isInvalid = hbResponse.getStatus().code() == ErrorCodes::InvalidReplicaSetConfig;
- // Replication of auth changes can cause temporary auth failures, and a temporary DNS outage can
- // make a node return InvalidReplicaSetConfig if it can't find itself in the config.
- if (hbResponse.isOK() || isUnauthorized || isInvalid) {
+ // Replication of auth changes can cause temporary auth failures.
+ if (hbResponse.isOK() || isUnauthorized) {
hbStats.hit(networkRoundTripTime);
} else {
hbStats.miss();