How it works...
We begin by bringing up a multinode replica set cluster. In step 2, while connected to the primary instance of the replica set, we execute the rs.printReplicationInfo() command. This command prints out the details pertaining to oplog. Oplogs, or operation logs, are database operations performed on the primary node of a replica set. They are stored in a capped collection and are replayed on the secondary nodes within a replica set. This is the core mechanism of how nodes within a replica set are synchronized. Coming back to the rs.printReplicationInfo() command's output, we can see the details of the current size of the oplog when it started and the timestamps of the first and last events. This can be a good reference point ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access