diff --git a/source/applications/map-reduce.txt b/source/applications/map-reduce.txt index 49877457335..43d77931e95 100644 --- a/source/applications/map-reduce.txt +++ b/source/applications/map-reduce.txt @@ -227,12 +227,7 @@ The map-reduce operation is composed of many tasks, including: These various tasks take the following locks: - The read phase takes a read lock. It yields every 100 documents. - -- The JavaScript code (i.e. ``map``, ``reduce``, ``finalize`` - functions) is executed in a single thread, taking a JavaScript lock; - however, most JavaScript tasks in map-reduce are very short and - yield the lock frequently. - + - The insert into the temporary collection takes a write lock for a single write. @@ -242,8 +237,11 @@ These various tasks take the following locks: If the output collection exists, then the output actions (i.e. ``merge``, ``replace``, ``reduce``) take a write lock. -Although single-threaded, the map-reduce tasks interleave and appear to -run in parallel. +.. versionchanged:: 2.4 + The V8 JavaScript engine added in 2.4 allows multiple JavaScript + operations to run at the same time. Prior to 2.4, JavaScript code + (i.e. ``map``, ``reduce``, ``finalize`` functions) executed in a + single thread, taking a JavaScript lock. .. note:: diff --git a/source/reference/command/eval.txt b/source/reference/command/eval.txt index 373b35c545e..c3cd54eecfd 100644 --- a/source/reference/command/eval.txt +++ b/source/reference/command/eval.txt @@ -141,10 +141,6 @@ eval - .. include:: /includes/fact-eval-lock.rst - - :dbcommand:`eval` also takes a JavaScript lock. - - .. modified in 2.4 version, the JavaScript lock is up to and including version 2.2 - - Do not use :dbcommand:`eval` for long running operations as :dbcommand:`eval` blocks all other operations. Consider using :doc:`other server side code execution options @@ -158,4 +154,9 @@ eval - .. include:: /includes/fact-eval-authentication.rst + .. versionchanged:: 2.4 + The V8 JavaScript engine added in 2.4 allows multiple JavaScript + operations to run at the same time. Prior to 2.4, + :dbcommand:`eval` would take a JavaScript lock. + .. seealso:: :doc:`/applications/server-side-javascript` diff --git a/source/reference/command/group.txt b/source/reference/command/group.txt index 5324ff02714..000c54ecca4 100644 --- a/source/reference/command/group.txt +++ b/source/reference/command/group.txt @@ -68,14 +68,10 @@ group .. warning:: - - The :dbcommand:`group` command does not work with - :term:`sharded clusters `. Use the - :term:`aggregation framework` or :term:`map-reduce` in - :term:`sharded environments `. - - - The :dbcommand:`group` command takes a read lock and does not - allow any other threads to execute JavaScript while it is - running. + The :dbcommand:`group` command does not work with :term:`sharded + clusters `. Use the :term:`aggregation + framework` or :term:`map-reduce` in :term:`sharded environments + `. .. note:: @@ -92,6 +88,9 @@ group - .. include:: /includes/fact-group-map-reduce-where-limitations-in-24.rst + - Prior to 2.4, the :dbcommand:`group` command took a JavaScript + lock. + For the shell, MongoDB provides a wrapper method :method:`db.collection.group()`; however, the :method:`db.collection.group()` method takes the ``keyf`` field and diff --git a/source/reference/method/db.collection.group.txt b/source/reference/method/db.collection.group.txt index 1fc512f19db..339db641db0 100644 --- a/source/reference/method/db.collection.group.txt +++ b/source/reference/method/db.collection.group.txt @@ -52,14 +52,10 @@ db.collection.group() .. warning:: - - The :method:`db.collection.group()` method does not work with - :term:`sharded clusters `. Use the - :term:`aggregation framework` or :term:`map-reduce` in - :term:`sharded environments `. - - - The :dbcommand:`group` command takes a read lock and does not - allow any other threads to execute JavaScript while it is - running. + The :method:`db.collection.group()` method does not work with + :term:`sharded clusters `. Use the + :term:`aggregation framework` or :term:`map-reduce` in + :term:`sharded environments `. .. note:: @@ -76,6 +72,9 @@ db.collection.group() - .. include:: /includes/fact-group-map-reduce-where-limitations-in-24.rst + - Prior to 2.4, the :method:`db.collection.group()` method took a + JavaScript lock. + Consider the following examples of the :method:`db.collection.group()` method: The examples assume an ``orders`` collection with documents of the diff --git a/source/reference/method/db.eval.txt b/source/reference/method/db.eval.txt index bba662a4702..cba51112d91 100644 --- a/source/reference/method/db.eval.txt +++ b/source/reference/method/db.eval.txt @@ -98,10 +98,6 @@ db.eval() .. |nolockobject| replace:: :dbcommand:`eval` *command* - .. include:: /includes/fact-eval-lock.rst - - - :method:`db.eval()` also takes a JavaScript lock. - - .. modified in 2.4 version, the JavaScript lock is up to and including version 2.2 - Do not use :method:`db.eval()` for long running operations, as :method:`db.eval()` blocks all other operations. Consider using @@ -116,6 +112,11 @@ db.eval() - .. include:: /includes/fact-eval-authentication.rst + .. versionchanged:: 2.4 + The V8 JavaScript engine added in 2.4 allows multiple JavaScript + operations to run at the same time. Prior to 2.4, + :method:`db.eval()` would take a JavaScript lock. + .. seealso:: :doc:`/applications/server-side-javascript`