Recall & Review
beginner
What is the oplog in MongoDB replication?
The oplog (operation log) is a special capped collection that records all changes to the data in the primary node. Secondary nodes use it to replicate these changes and stay in sync.
Click to reveal answer
beginner
How does MongoDB replication keep data consistent across nodes?
MongoDB replication uses the oplog to copy all write operations from the primary node to secondary nodes. This ensures all nodes have the same data over time.
Click to reveal answer
intermediate
What type of collection is the oplog in MongoDB?
The oplog is a capped collection, meaning it has a fixed size and works like a circular buffer, overwriting old entries when full.
Click to reveal answer
intermediate
What happens if a secondary node falls behind and misses oplog entries?
If a secondary node falls too far behind and oplog entries it needs are overwritten, it must perform a full resync from the primary to catch up.
Click to reveal answer
beginner
Why is the oplog important for MongoDB's replication mechanism?
The oplog allows MongoDB to replicate data efficiently by recording only changes, not full data snapshots, enabling fast and incremental updates to secondaries.
Click to reveal answer
What does the oplog in MongoDB store?
✗ Incorrect
The oplog stores all write operations (inserts, updates, deletes) performed on the primary node.
What type of collection is the oplog in MongoDB?
✗ Incorrect
The oplog is a capped collection with a fixed size that overwrites old entries when full.
If a secondary node misses oplog entries, what must it do?
✗ Incorrect
If oplog entries are lost, the secondary must do a full resync to get current data.
How does MongoDB replication ensure data consistency?
✗ Incorrect
Replication copies oplog entries to keep all nodes consistent.
What is the main advantage of using an oplog for replication?
✗ Incorrect
The oplog records only changes, allowing efficient incremental replication.
Explain how MongoDB uses the oplog to replicate data between primary and secondary nodes.
Think about how changes on one node get copied to others.
You got /4 concepts.
Describe what happens when a secondary node falls behind and misses oplog entries in MongoDB replication.
Consider the fixed size of the oplog and its impact.
You got /4 concepts.