C100DBA Application Administration Practice Question
A developer is using the MongoDB Node.js driver and wants to ensure that a write operation is acknowledged by a majority of replica set members and is also written to the on-disk journal before returning success. Which write concern should be specified?
⚠ Common exam trap
The trap here is assuming that w:2 is always equivalent to majority, but in replica sets with more than three voting members, w:2 is not a majority. Only w:"majority" dynamically calculates the majority based on the number of voting members.
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
✓
{ w: "majority", j: true }
The developer needs both majority acknowledgment and journaling. The write concern { w: "majority", j: true } ensures that a majority of replica set members have applied the write and that it has been written to the on-disk journal on those members. This provides the strongest durability guarantee, preventing data loss even if the primary crashes. Other options either lack majority acknowledgment or journaling.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
{ w: 2, j: true }
Why it's wrong here
This write concern requires acknowledgment from the primary and one secondary and waits for journaling on those nodes. However, it does not guarantee that a majority of voting members have acknowledged the write. For example, in a three-node replica set, w:2 is a majority, but in a five-node set, it is not. Since the requirement is for majority acknowledgment, this is not always correct.
- ✗
{ w: 1, j: true }
Why it's wrong here
This write concern acknowledges the write on the primary and waits for it to be journaled on the primary only. It does not ensure that a majority of replica set members have the write, so it cannot prevent rollback if the primary fails. Therefore, it does not meet the requirement for majority acknowledgment.
- ✓
{ w: "majority", j: true }
Why this is correct
This write concern combines majority acknowledgment with journaling. The w: "majority" ensures that a majority of replica set members have applied the write, and j: true ensures that the write is committed to the on-disk journal on those members. This provides the highest level of durability and meets the developer's requirement.
- ✗
{ w: "majority", j: false }
Why it's wrong here
This write concern ensures majority acknowledgment but does not wait for the write to be journaled. Without journaling, the write could be lost if the primary crashes before the journal is written to disk, even though it was acknowledged by a majority. The developer specifically requires journaling, so this is insufficient.
About these practice questions
Courseiva writes every C100DBA question from scratch — 222 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.