Courseiva
Replication →hardMultiple Select

C100DBA Replication Practice Question

You are administering a MongoDB 6.0 replica set with three members: a primary and two secondaries. You need to perform a rolling maintenance on the secondaries, which involves restarting each secondary one at a time. Which two actions must you take to ensure that the replica set remains available for writes during the maintenance? (Choose two.)

⚠ Common exam trap

The trap here is thinking that you need to step down the primary or change priorities to perform maintenance; in reality, you only need to maintain majority by keeping the primary and at least one secondary available.

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

✓

Restart the secondaries one at a time, waiting for each to fully rejoin and catch up before proceeding to the next.

To keep a replica set writable during rolling maintenance on secondaries, you must ensure the primary retains a majority of voting members. In a three-member set, this means keeping the primary and at least one secondary online. Restarting secondaries one at a time and waiting for each to catch up before moving to the next maintains majority and data consistency. This approach allows the primary to continue accepting writes without interruption, provided no other failures occur.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Disable authentication on the replica set to simplify the restart process.

    Why it's wrong here

    Disabling authentication is a security risk and does not help maintain write availability during rolling maintenance. Authentication settings are configured at startup and should not be changed during maintenance. The replica set can be maintained without altering authentication, and doing so could expose data. This action is irrelevant to the goal of keeping the set writable.

  • ✗

    Set the priority of the primary to 0 to prevent it from being re-elected during the maintenance.

    Why it's wrong here

    Setting the primary's priority to 0 would make it ineligible to be primary, causing it to step down and triggering an election. This would disrupt writes and is not necessary for rolling maintenance on secondaries. The primary should remain primary to continue accepting writes while secondaries are restarted. Changing priority is not part of the procedure.

  • ✓

    Restart the secondaries one at a time, waiting for each to fully rejoin and catch up before proceeding to the next.

    Why this is correct

    Restarting secondaries one at a time ensures that at any moment, at least one secondary remains available to maintain a majority with the primary. Waiting for each secondary to fully rejoin and catch up before restarting the next prevents the set from losing majority and ensures that if the primary fails, a fully caught-up secondary can be elected. This is a standard rolling maintenance practice.

  • ✗

    Use rs.stepDown() to force the primary to step down before restarting any secondary.

    Why it's wrong here

    Forcing the primary to step down before restarting a secondary is unnecessary and could cause an election, potentially leading to a brief write outage. The goal is to keep the primary up and maintain majority. Stepping down the primary would temporarily leave the set without a primary until a new one is elected, which is not required for rolling maintenance on secondaries.

  • ✓

    Ensure that the primary remains up and can communicate with a majority of voting members.

    Why this is correct

    For the replica set to remain writable, the primary must maintain communication with a majority of voting members. In a three-member set, a majority is two. As long as the primary and at least one secondary are up and communicating, the primary retains majority and can continue accepting writes. This is essential to avoid the primary stepping down during the rolling restart.

About these practice questions

One of 222 original C100DBA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.