@@ -226,21 +226,21 @@ The map-reduce operation is composed of many tasks, including:
226
226
227
227
These various tasks take the following locks:
228
228
229
- - The reads from the input collection takes a read lock that is yielded
230
- every 100 documents.
229
+ - The read phase takes a read lock. It yields every 100 documents.
231
230
232
231
- The JavaScript code (i.e. ``map``, ``reduce``, ``finalize``
233
232
functions) is executed in a single thread, taking a JavaScript lock;
234
233
however, most JavaScript tasks in map-reduce are very short and
235
- yields the lock frequently.
234
+ yield the lock frequently.
236
235
237
236
- The insert into the temporary collection takes a write lock for a
238
237
single write.
239
238
240
- If the final collection does not exist, the creation of the final
241
- collection the output actions takes a write lock. If the final
242
- collection exists, then the output actions (i.e. ``merge``,
243
- ``replace``, ``reduce``) take a write lock.
239
+ If the output collection does not exist, the creation of the output
240
+ collection takes a write lock.
241
+
242
+ If the output collection exists, then the output actions (i.e.
243
+ ``merge``, ``replace``, ``reduce``) take a write lock.
244
244
245
245
Although single-threaded, the map-reduce tasks interleave and appear to
246
246
run in parallel.
0 commit comments