Courseiva
Replication →mediumMultiple Choice

C100DBA Replication Practice Question

You are the DBA for a MongoDB 6.0 replica set with three voting members: rs0-primary (priority 2), rs0-secondary-1 (priority 1), and rs0-secondary-2 (priority 1). The primary fails and is unavailable for an extended period. You need to ensure that rs0-secondary-1 is elected as the new primary instead of rs0-secondary-2. Which action should you take before the primary fails?

⚠ Common exam trap

Candidates often confuse votes with priority; votes control whether a member can vote in elections, while priority controls which member is more likely to be elected primary.

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

✓

Set rs0-secondary-1's priority to 2 and rs0-secondary-2's priority to 0.5 using rs.reconfig().

Election priority determines which eligible secondary is most likely to win an election. By setting rs0-secondary-1's priority higher than rs0-secondary-2's, you make it the preferred candidate. Lowering rs0-secondary-2's priority to a non-zero value keeps it as a voting member but reduces its election chances. This approach is the standard way to control primary election outcomes in a MongoDB replica set without making a member unelectable.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Set rs0-secondary-1's hidden property to true and rs0-secondary-2's hidden property to false using rs.reconfig().

    Why it's wrong here

    Setting rs0-secondary-1 to hidden would make it ineligible to become primary, which is the opposite of the desired outcome. Hidden members have priority 0 and cannot be elected. This would ensure rs0-secondary-2 becomes primary, not rs0-secondary-1. Therefore, this action is incorrect for the scenario.

  • ✗

    Set rs0-secondary-1's slaveDelay to 0 and rs0-secondary-2's slaveDelay to 3600 using rs.reconfig().

    Why it's wrong here

    slaveDelay controls how far behind the primary a secondary should lag; it does not influence election priority. Setting a slaveDelay on rs0-secondary-2 would delay its replication, but it would not prevent it from being elected if its priority is higher. This action does not achieve the goal of ensuring rs0-secondary-1 becomes primary.

  • ✓

    Set rs0-secondary-1's priority to 2 and rs0-secondary-2's priority to 0.5 using rs.reconfig().

    Why this is correct

    Raising rs0-secondary-1's priority above rs0-secondary-2's priority ensures that, when the current primary is unavailable, rs0-secondary-1 is more likely to win the election. Lowering rs0-secondary-2's priority to 0.5 further reduces its chance of being elected, while still allowing it to vote. This is the correct way to influence election outcomes without making the member unelectable.

  • ✗

    Set rs0-secondary-1's votes to 1 and rs0-secondary-2's votes to 0 using rs.reconfig().

    Why it's wrong here

    Setting votes to 0 on rs0-secondary-2 would prevent it from voting in elections, but it would not prevent it from being elected. In fact, a member with votes 0 can still become primary if its priority is high enough. This does not guarantee that rs0-secondary-1 will be elected; it only changes the voting behavior, not the election priority.

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.