@@ -289,18 +289,20 @@ behaviors:
289
289
Multithreaded Replication
290
290
-------------------------
291
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.
292
+ MongoDB applies write operations in batches using a multithreaded
293
+ approach. The replication process divides each batch among a group of
294
+ threads which apply many operations with greater concurrency.
295
+
296
+ Even though threads may apply operations out of order, a client
297
+ reading data from a secondary will never return documents that reflect
298
+ an in-between state that never existed on the primary. To ensure this
299
+ consistency, MongoDB blocks all read operations while applying the
300
+ batch of operations
301
+
302
+ To help improve the performance of operation application, MongoDB
303
+ fetches all the memory pages that hold data and indexes that the
304
+ operations in the batch will affect. The prefetch stage minimizes the
305
+ amount of time MongoDB must hold the write lock to apply operations.
304
306
305
307
Pre-Fetching Indexes to Improve Replication Throughput
306
308
------------------------------------------------------
0 commit comments