Courseiva
Replication →mediumMultiple Choice

C100DBA Replication Practice Question

You are the DBA for a three-member MongoDB replica set. The primary becomes unreachable due to a network partition, and two secondaries remain in communication. After the election timeout, one secondary is elected primary. What is the required condition for a new primary to be elected?

⚠ Common exam trap

The trap here is assuming that the member with the highest priority or most recent oplog can become primary without a majority quorum.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

A majority of voting members must be available and able to communicate.

MongoDB replica sets require a majority of voting members to elect a primary. In a three-member set, two members must be available. The elected primary must have the highest optime among the majority to ensure data consistency. This mechanism prevents split-brain scenarios and ensures that only one primary can accept writes at a time.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Any secondary with the highest priority automatically becomes primary without needing a majority.

    Why it's wrong here

    Priority influences which eligible secondary is elected, but it does not bypass the majority requirement. Without a majority of voting members, no election can succeed regardless of priority. If a majority is not available, the remaining members remain secondaries, and the replica set cannot accept writes.

  • ✗

    The arbiter, if present, must vote and can be the sole voter to elect a primary.

    Why it's wrong here

    An arbiter can vote but cannot become primary and does not store data. However, an arbiter alone cannot elect a primary; a majority of all voting members (including arbiters) must still participate. In a three-member set with one arbiter, the arbiter plus one data-bearing member can form a majority, but the arbiter alone cannot.

  • ✗

    The secondary with the most recent oplog entry is elected primary even if it is the only member available.

    Why it's wrong here

    The most recent oplog entry helps determine the best candidate, but a single member cannot elect itself. MongoDB requires a majority of voting members to be present. Even if a secondary has the most recent oplog, it cannot become primary alone, preventing a situation where a minority partition elects a primary and causes divergent data.

  • ✓

    A majority of voting members must be available and able to communicate.

    Why this is correct

    In MongoDB, a new primary is elected only if a majority of voting members are available and can communicate. In a three-member replica set, two voting members must be reachable. This ensures that the replica set does not split-brain and that the elected primary has the most recent data, as it must have the highest optime among the majority.

About these practice questions

This C100DBA question is part of Courseiva's 222-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official MongoDB exam blueprint

This C100DBA practice question is part of Courseiva's free MongoDB certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the C100DBA exam.