Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions source/core/replication-internals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,22 @@ behaviors:
value, either ``true`` or ``false``, for the
:data:`members[n].buildIndexes` field.

Multithreaded Replication
-------------------------

MongoDB supports multithreaded replication by applying write operations
on secondary nodes in batches. Each batch is divided among many threads.
The multithreaded writes allow for concurrent CPU usage.

Despite the multithreaded writes, reads on secondaries do not "see"
operations applied out of order. While the threads are writing, MongoDB
blocks read operations, even if the write operations yield.

Before writing a batch of oplog operations, MongoDB fetches all the
memory pages that contain the data and indexes to be written. The
prefetch stage minimizes the amount of time MongoDB must hold the write
lock to apply operations.

Pre-Fetching Indexes to Improve Replication Throughput
------------------------------------------------------

Expand Down