adding and removing a node from a mongo replica set
The command should be fine to run. Why ???

Each rs.add() and rs.remove() should trigger an election. Since the priorities of the remaining nodes have unique values:


_id : 7 as priority : 20
_id : 8 as priority : 10
_id : 9 as priority : 1


you can say the election is rigged. The primary node should remain the primary.