I am confused as to how MongoDB voting happens internally. The MongoDB docs don't seem to give details--they merely discuss voting at a high level. This post (Voting in MongoDB) explains the results but not the internals.
From what I have researched, two options seem possible:
- One member announces it is running for election. All voting members vote yes/no, and the member must receive a majority of yes's in order to be elected primary.
- Somehow an election is called for. All voting members place their vote for one member. Whoever receives a majority of the votes (if anyone does) then becomes primary.
I know these are similar, but I need to be able to explain how voting works for a presentation. Which option is correct? A combination?
Important followup question: What happens in a tie, or if no member receives a majority?