What are the scenarios that cause mongodb to trigger an election on rs.add()?
In version 3.2.11, I have seen multiple times that adding/removing member to replica set does not trigger an election.
Contrary, in version 2.6, most of the times on rs.add()/rs.remove() calls would trigger election.
From docs, rs.add() can, in some cases, trigger an election.
What are the possible situations that may trigger an election? How can I completely avoid the election during rs.add()?
PS: There are some scenarios where we don't want an election to be triggered.
Election is triggered at least in scenario when you include "priority" information with node name.