Courseiva

C100DEV Drivers, Tools, Transactions, and Search Practice Question

Which of the following describes the behavior of a 'write concern' in a MongoDB transaction?

⚠ Common exam trap

Candidates often mistakenly believe write concern is configured globally at the client or session level, forgetting that for transactions, it must be explicitly defined within the commitTransaction command parameters.

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

✓

It is specified during the commitTransaction command.

Transactions in MongoDB honor the write concern configured on the 'commitTransaction' command. This allows developers to specify the durability level, such as 'majority', ensuring that changes are acknowledged by the majority of replica set members before the transaction is considered complete. Proper management of write concerns ensures that even if a primary node fails immediately after a commit, the data remains durable and consistent across the cluster.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Write concern is ignored inside multi-document transactions.

    Why it's wrong here

    Write concerns are fully supported within transactions. Developers can define the level of durability they require for the commit, which is crucial for financial or critical data operations where consistency and persistence guarantees are mandatory. Ignoring write concerns would risk data loss in the event of failover.

  • ✗

    It is applied to each individual operation within the transaction.

    Why it's wrong here

    Write concern settings are applied at the time of the 'commitTransaction' command for the entire transaction. Individual operations inside the transaction do not use their own write concerns, as the goal is to atomicize the state change of multiple operations as a single, durable block of work.

  • ✓

    It is specified during the commitTransaction command.

    Why this is correct

    The write concern is explicitly set when calling commitTransaction. This allows the application to control the acknowledgement level for the entire transaction block. This mechanism is standard for ensuring that all changes are successfully hardened on the required number of nodes before the application considers the transaction finished.

  • ✗

    It is determined solely by the server's default configuration.

    Why it's wrong here

    While the server has a default write concern, the application can override this for specific transactions via the commit command. Relying solely on server defaults is risky for critical transactions, as the application-level requirement for data durability might exceed what the default configuration provides in a high-availability environment.

About these practice questions

One of 259 original C100DEV 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 C100DEV 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 C100DEV exam.