C100DBA Application Administration Practice Question
Which mechanism ensures an application receives an error if a write is not persisted to the majority of nodes in a replica set?
⚠ Common exam trap
Students frequently select read preference or journaling parameters, confusing the mechanism for confirming writes across nodes with local disk journaling.
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
✓
Setting the write concern to 'w: majority'.
The 'majority' write concern provides a guarantee that the write operation has been committed to a majority of the replica set members. This is the industry standard for ensuring data durability in the event of a primary node failover. DBAs must enforce this setting for critical business data to prevent 'lost updates' where an application assumes a write is permanent when it actually exists only on the primary that is about to crash.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Setting the read concern to 'majority'.
Why it's wrong here
The read concern 'majority' only ensures that the data read has been acknowledged by a majority of the replica set, preventing reads of uncommitted data. It does not govern the behavior of write operations or ensure that writes are durably persisted across the cluster during the write phase.
- ✓
Setting the write concern to 'w: majority'.
Why this is correct
A write concern of 'w: majority' blocks the application thread until the write is acknowledged by the majority of the replica set members. If the write cannot reach this threshold, the database returns an error to the driver, allowing the application to implement appropriate retry or compensation logic to handle failures.
- ✗
Enabling the 'journal' option on all members.
Why it's wrong here
The journal option ensures that data is written to the on-disk journal before acknowledgment. While it increases durability on a single node, it does not guarantee that the write has been replicated to other nodes in the cluster, failing to protect against data loss if the primary node hardware fails.
- ✗
Using the 'majority' read preference.
Why it's wrong here
Read preference is used to define which members of the replica set can answer a read query. There is no such thing as a 'majority' read preference in MongoDB. This term is a confusion of read concern and read preference, neither of which addresses the durability requirements of write operations in production.
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 →
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.