File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ Server-side JavaScript
7
7
MongoDB supports server-side execution of JavaScript code using various
8
8
methods.
9
9
10
- .. note:: The JavaScript code execution takes a JavaScript lock.
10
+ .. note::
11
+
12
+ The JavaScript code execution takes a JavaScript lock: each
13
+ :program:`mongod` can only execute a single JavaScript operation at
14
+ a time.
11
15
12
16
.. _server-side-map-reduce:
13
17
@@ -38,9 +42,13 @@ bottleneck if performing these operations on the client-side.
38
42
39
43
.. warning::
40
44
41
- By default, :dbcommand:`eval` command requires a write lock. As such
42
- :dbcommand:`eval` will block all other read and write operations
43
- while it runs.
45
+ By default, :dbcommand:`eval` command requires a write lock. As
46
+ such :dbcommand:`eval` will block all other read and write
47
+ operations while it runs. Because only a single JavaScript process
48
+ can run at a time, *do not* run :dbcommand:`mapReduce`,
49
+ :dbcommand:`group`, queries with the :operator:`$where` or any
50
+ other operation that requires JavaScript execution within
51
+ :dbcommand:`eval` operations.
44
52
45
53
See :dbcommand:`eval` command and :method:`db.eval()` documentation for
46
54
more information, including examples.
You can’t perform that action at this time.
0 commit comments