Courseiva
Replication →easyMultiple Choice

C100DBA Replication Practice Question

You are a DBA for a MongoDB replica set. A developer asks you to explain what the oplog is and why it is important. What is the correct description?

⚠ Common exam trap

Test-takers frequently confuse the oplog with a general log file for auditing or a cache for read performance, when it is specifically a replication mechanism for write operations.

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

✓

The oplog is a capped collection that records all write operations and is used by secondaries to replicate data from the primary.

The oplog is a capped collection in the local database that records all write operations. Secondaries replicate by reading the oplog and applying the operations. This mechanism ensures that all members eventually have the same data, enabling high availability and failover.

Answer analysis

Option-by-option breakdown

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

  • ✗

    The oplog is a temporary file used during initial sync to transfer data from the primary to a new secondary.

    Why it's wrong here

    Initial sync uses the oplog to apply operations that occurred during the data copy phase, but the oplog is a persistent capped collection, not a temporary file. It exists on all data-bearing members and continuously records writes. It is not created solely for initial sync.

  • ✗

    The oplog is a cache that stores frequently accessed documents to improve read performance.

    Why it's wrong here

    The oplog is not a cache. Caching is handled by the WiredTiger storage engine and the filesystem cache. The oplog's role is to record write operations for replication. It does not store documents for read performance; it stores idempotent operations that can be replayed.

  • ✓

    The oplog is a capped collection that records all write operations and is used by secondaries to replicate data from the primary.

    Why this is correct

    The oplog (operations log) is a capped collection in the local database that records all write operations. Secondaries continuously read the oplog from their sync source and apply the operations to their own data sets, ensuring replication. It is essential for maintaining data consistency across replica set members.

  • ✗

    The oplog is a log file on disk that records all queries and read operations for auditing purposes.

    Why it's wrong here

    The oplog does not record read operations; it only records write operations. Auditing of read operations is handled by separate mechanisms like the audit log, not the oplog. The oplog's purpose is replication, not auditing. It is a capped collection, not a text log file.

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 →

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.