Skip to content

Commit

Permalink
fix: remove servers with me mismatch in updateRsFromPrimary
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Jan 8, 2020
1 parent 700d5dc commit 95a772e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/core/sdam/topology_description.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ function updateRsFromPrimary(
maxElectionId
) {
setName = setName || serverDescription.setName;
if (setName !== serverDescription.setName) {
if (
setName !== serverDescription.setName ||
(serverDescription.me && serverDescription.address !== serverDescription.me)
) {
serverDescriptions.delete(serverDescription.address);
return [checkHasPrimary(serverDescriptions), setName, maxSetVersion, maxElectionId];
}
Expand Down

0 comments on commit 95a772e

Please sign in to comment.