Skip to content

Commit a3619ef

Browse files
author
Sam Kleinman
committed
DOCS-517: increase warning about js and eval
1 parent 708838f commit a3619ef

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

source/applications/server-side-javascript.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ Server-side JavaScript
77
MongoDB supports server-side execution of JavaScript code using various
88
methods.
99

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.
1115

1216
.. _server-side-map-reduce:
1317

@@ -38,9 +42,13 @@ bottleneck if performing these operations on the client-side.
3842

3943
.. warning::
4044

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.
4452

4553
See :dbcommand:`eval` command and :method:`db.eval()` documentation for
4654
more information, including examples.

0 commit comments

Comments
 (0)