summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Schultz <william.schultz@mongodb.com>2020-06-29 16:44:10 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-29 21:11:47 +0000
commit9e41b51edf59d75b745d0dd304a29287e7e87bf5 (patch)
tree4452808386aa9ae32e072930bd92c7ea7324c367 /src
parent8b66a4536d44e025b3d81c49befc2e794282af6b (diff)
downloadmongo-9e41b51edf59d75b745d0dd304a29287e7e87bf5.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)
Diffstat (limited to 'src')
-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 6f6394c43eb..4fef050eb52 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -3116,6 +3116,9 @@ ReplicationCoordinatorImpl::_setCurrentRSConfig_inlock(OperationContext* opCtx,
// 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();
}
_updateLastCommittedOpTime_inlock();