Skip to content

Commit a9f325f

Browse files
author
Sam Kleinman
committed
merge: DOCS-871
2 parents 3847fff + b7eed97 commit a9f325f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

source/core/replication-internals.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,22 @@ behaviors:
286286
value, either ``true`` or ``false``, for the
287287
:data:`members[n].buildIndexes` field.
288288

289+
Multithreaded Replication
290+
-------------------------
291+
292+
MongoDB supports multithreaded replication by applying write operations
293+
on secondary nodes in batches. Each batch is divided among many threads.
294+
The multithreaded writes allow for concurrent CPU usage.
295+
296+
Despite the multithreaded writes, reads on secondaries do not "see"
297+
operations applied out of order. While the threads are writing, MongoDB
298+
blocks read operations, even if the write operations yield.
299+
300+
Before writing a batch of oplog operations, MongoDB fetches all the
301+
memory pages that contain the data and indexes to be written. The
302+
prefetch stage minimizes the amount of time MongoDB must hold the write
303+
lock to apply operations.
304+
289305
Pre-Fetching Indexes to Improve Replication Throughput
290306
------------------------------------------------------
291307

0 commit comments

Comments
 (0)