summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Schultz <william.schultz@mongodb.com>2020-03-24 16:51:48 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-27 23:15:41 +0000
commit85f1ed156770a7821d39ff1704327d4b9a7c41ab (patch)
tree191c61ca70f1fd7c3d6d79d3a9a7417dbe34a35b
parent444dab325b5351ddd566da1d5365ec8728a06634 (diff)
downloadmongo-85f1ed156770a7821d39ff1704327d4b9a7c41ab.tar.gz
SERVER-46897 Clear replication node seed list whenever we install a new config that we are not a member of
(cherry picked from commit c2b282a1ba5f4f87d59456912073398a504281dc)
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index 8368d7dc3b9..cc28dcc0709 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -3362,6 +3362,9 @@ ReplicationCoordinatorImpl::_setCurrentRSConfig(WithLock lk,
// Don't send heartbeats if we're not in the config, if we get re-added one of the
// nodes in the set will contact us.
_startHeartbeats_inlock();
+ } else {
+ // If we're still REMOVED, clear the seedList.
+ _seedList.clear();
}
_updateLastCommittedOpTimeAndWallTime(lk);