Courseiva
Replication →hardMultiple Choice

C100DBA Replication Practice Question

Exhibit

rs.status() output:
member[0]: { stateStr: 'PRIMARY', optime: { ts: Timestamp(100, 1) } }
member[1]: { stateStr: 'SECONDARY', optime: { ts: Timestamp(90, 1) } }
member[2]: { stateStr: 'SECONDARY', optime: { ts: Timestamp(95, 1) } }

Refer to the exhibit. If the primary node fails, which node is most likely to be elected the next primary based on optime?

⚠ Common exam trap

Candidates often pick the node with the highest priority setting, ignoring that optime takes precedence during primary elections.

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

✓

Member[2] will likely be elected because it is more up-to-date.

Elections prioritize the node with the most up-to-date data. The optime (operation time) represents the latest operation applied by the node. Member[2] is the most advanced secondary with a timestamp of 95, compared to Member[1] at 90. Therefore, Member[2] has the highest probability of winning the election, ensuring the new primary has the most current data available in the set.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Member[1] will always be elected.

    Why it's wrong here

    Member[1] is behind both the primary and Member[2]. MongoDB prioritizes nodes that are closer to the primary's state to minimize data loss. Since Member[2] has a higher optime, it is a much stronger candidate for the election than Member[1], which is further behind in the replication process.

  • ✓

    Member[2] will likely be elected because it is more up-to-date.

    Why this is correct

    During an election, nodes compare their oplog state. Member[2] has an optime of 95, making it the most current secondary. Nodes that are more up-to-date are preferred in elections because they minimize the need for rollbacks or data re-syncs, helping to maintain overall cluster consistency and reliability after a failure.

  • ✗

    No node can be elected because the timestamps are all different.

    Why it's wrong here

    It is common for secondaries to have slightly different optimes due to network latency. The election process is designed to handle this by comparing timestamps and choosing the node that is most current. The lack of perfect synchronization does not invalidate the election; it simply dictates which node wins.

  • ✗

    The election will trigger a full re-sync for all nodes.

    Why it's wrong here

    A full re-sync is an extreme measure taken only when a node cannot recover its state from the oplog. A simple failure of the primary followed by an election will not cause the secondaries to re-sync. They will continue replicating from the new primary once the election concludes successfully.

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.