C100DBA Replication Practice Question
What is the primary function of the oplog in a MongoDB replica set?
⚠ Common exam trap
Candidates often confuse the oplog with a backup or transaction log meant for point-in-time recovery. It is specifically designed for asynchronous replication between replica set 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
✓
To record all operations for asynchronous replication.
The oplog, or operation log, is a capped collection that stores all write operations as they are applied to the database. Secondaries read these entries and apply them to their own datasets. This asynchronous replication process ensures that all members of the replica set eventually reach the same state, providing both data redundancy and high availability 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.
- ✗
To store user credentials and authentication data.
Why it's wrong here
User credentials are stored in the admin database, specifically in the system.users collection. The oplog is strictly for tracking data modification operations, such as inserts, updates, and deletes, so that secondaries can replicate those changes. It is not used for authentication or security configuration management in MongoDB.
- ✓
To record all operations for asynchronous replication.
Why this is correct
The oplog is essential for replication. It acts as a chronological ledger of every write operation performed on the primary. Secondaries continuously tail this log and apply the operations locally, ensuring that they stay synchronized with the primary node, which is the core mechanism behind MongoDB's high availability model.
- ✗
To cache frequently accessed query results in memory.
Why it's wrong here
Query caching is managed by the storage engine's cache (like WiredTiger) and the internal plan cache. The oplog is a persistent disk-based capped collection used for replication purposes, not for query performance or result set caching. Storing query results in the oplog would be highly inefficient and inappropriate.
- ✗
To perform automatic backups for disaster recovery.
Why it's wrong here
While the oplog can be used as part of a point-in-time recovery strategy, it is not an automatic backup tool. Backups require tools like mongodump or physical file system snapshots. The oplog is a real-time stream of operations meant for keeping replica set members in sync, not for long-term storage.
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.