nerdexam
MongoDB

C100DBA · Question #60

The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases. All the replica set members contain a copy of the

The correct answer is D. local.oplog.rs. In MongoDB replica sets, the oplog is stored in the local database as a capped collection named oplog.rs, making local.oplog.rs the correct and complete namespace. Option A is wrong because the collection name doesn't include the replica set ID - MongoDB uses a fixed name regardl

Replication

Question

The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases. All the replica set members contain a copy of the oplog in the following collection:

Options

  • A<replicasetid>.oplog.rs
  • Boplog.rs
  • C<database>..oplog.rs
  • Dlocal.oplog.rs

How the community answered

(54 responses)
  • A
    4% (2)
  • B
    2% (1)
  • C
    2% (1)
  • D
    93% (50)

Explanation

In MongoDB replica sets, the oplog is stored in the local database as a capped collection named oplog.rs, making local.oplog.rs the correct and complete namespace. Option A is wrong because the collection name doesn't include the replica set ID - MongoDB uses a fixed name regardless of your replica set configuration. Option B (oplog.rs alone) omits the required database prefix; every MongoDB collection must be referenced as database.collection. Option C is wrong because the oplog is not stored per-database - it lives in one centralized location (local) and captures operations across all databases. Memory tip: Think "Local Oplog" - the local database is a special system database that exists on every mongod instance, and it's the home for replication metadata; nothing user-facing lives there, which is why it's easy to overlook.

Topics

#oplog#local database#replica set#capped collection

Community Discussion

No community discussion yet for this question.

Full C100DBA Practice