liveBook · Manning

Logical initial sync

As explained in MongoDB 8.0 in Action, Third Edition

Logical initial sync is a MongoDB synchronization method that copies collection documents and indexes, records concurrent oplog entries, and applies those entries to catch up.

Logical initial sync adds a replica-set member by copying collection documents and indexes, recording concurrent oplog entries, and applying those entries until the member catches up. section 9.1.3

The process depends on maintaining enough oplog history:

  • Copy collection documents and indexes to the new member. section 9.1.3
  • Track operations generated while the initial copy runs. section 9.1.3
  • Apply the recorded operations so the member reaches the primary’s current state. section 9.1.3
  • Keep the oplog window long enough to prevent entries from being purged before application. section 9.1.3

Check the oplog window

Run db.getReplicationInfo() to inspect configured oplog size, usage, and the available time difference between the oldest and newest entries.

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Explains copying, oplog capture, replay, retention requirements, and failure windows without detailing implementation internals.
Examples
Uses db.getReplicationInfo() output and individual oplog documents to illustrate retention monitoring and recorded operations.
What it assumes
Assumes replica-set and oplog concepts, while distinguishing logical synchronization from file-based synchronization.
What you can do after
Operate/configure synchronization by checking oplog capacity and retention before choosing logical or file-based initial sync.
How it connects
Connects logical initial sync with replica sets, secondaries, the oplog collection, and file-based initial sync.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of MongoDB 8.0 in Action, Third Edition. The section links point to the parts of the book it draws on.