diff --git a/config/redirects.yaml b/config/redirects.yaml index 680933913d6..20ced2dcc1a 100644 --- a/config/redirects.yaml +++ b/config/redirects.yaml @@ -874,6 +874,13 @@ code: 303 outputs: - 'before-v3.0' --- +from: '/release-notes/3.2-javascript' +to: '/release-notes' +type: 'redirect' +code: 303 +outputs: + - 'before-v3.0' +--- from : '/core/index-partial' to: '/core/index-sparse' type: 'redirect' diff --git a/source/includes/options-mongo.yaml b/source/includes/options-mongo.yaml index bcd27b0175b..0affc5c26a1 100644 --- a/source/includes/options-mongo.yaml +++ b/source/includes/options-mongo.yaml @@ -332,4 +332,14 @@ inherit: name: sslAllowInvalidHostnames program: _shared file: options-shared.yaml +--- +program: mongo +name: disableJavaScriptJIT +directive: option +optional: true +args: null +description: | + .. versionadded:: 3.2 + + Disables use of the JavaScript engine's JIT compiler. ... diff --git a/source/reference/command/buildInfo.txt b/source/reference/command/buildInfo.txt index d0c53765c26..b9a54d387c9 100644 --- a/source/reference/command/buildInfo.txt +++ b/source/reference/command/buildInfo.txt @@ -85,11 +85,11 @@ These fields are stable and should provide consistent behavior. .. data:: buildInfo.javascriptEngine - .. versionchanged:: 2.4 + .. versionchanged:: 3.2 A string that reports the JavaScript engine used in the - :program:`mongod` instance. By default, this is ``V8`` after - version 2.4, and ``SpiderMonkey`` before 2.4. + :program:`mongod` instance. By default, this is ``mozjs`` after + version 3.2, and previously ``V8``. .. data:: buildInfo.bits diff --git a/source/reference/command/setParameter.txt b/source/reference/command/setParameter.txt index b5ef2b5fc89..45ce92cb68d 100644 --- a/source/reference/command/setParameter.txt +++ b/source/reference/command/setParameter.txt @@ -53,5 +53,9 @@ setParameter - :parameter:`syncdelay` - :parameter:`wiredTigerEngineRuntimeConfigSetting` + **JavaScript** + + - :parameter:`disableJavaScriptJIT` + .. slave-ok, admin-only .. textSearchEnabled, deprecated v2.6 diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 39706568d84..e29e177ed2d 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -376,7 +376,7 @@ General Parameters db.getSiblingDB('admin').runCommand( { setParameter: 1, failIndexKeyTooLong: false } ) You can also set :parameter:`failIndexKeyTooLong` at - run-time with the following operation. + startup time with the following option: .. code-block:: sh @@ -462,13 +462,42 @@ General Parameters db.getSiblingDB('admin').runCommand( { setParameter: 1, ttlMonitorEnabled: false } ) - Alternately, you may disable the thread at run-time by starting the + Alternately, you may disable the thread at startup time by starting the :program:`mongod` instance with the following option: .. code-block:: sh mongod --setParameter ttlMonitorEnabled=false + +.. parameter:: disableJavaScriptJIT + + .. versionadded:: 3.2 + + |mongod-only| + + The MongoDB JavaScript engine uses SpiderMonkey, which implements + Just-in-Time (JIT) compilation for improved performance when running scripts. + + To disable the JIT, set :parameter:`disableJavaScriptJIT` to ``true``, as in + the following example: + + .. code-block:: javascript + + db.getSiblingDB('admin').runCommand( { setParameter: 1, disableJavaScriptJIT: true } ) + + Be aware that :dbcommand:`group` and :query:`$where` will reuse existing + JavaScript interpreter contexts, so changes to + :parameter:`disableJavaScriptJIT` may not take effect immediately for these + operations. + + Alternately, you may disable the JIT at startup time by starting the + :program:`mongod` instance with the following option: + + .. code-block:: sh + + mongod --setParameter disableJavaScriptJIT=true + Logging Parameters ~~~~~~~~~~~~~~~~~~ @@ -585,7 +614,7 @@ Logging Parameters } ) You can also set parameter :parameter:`logComponentVerbosity` at - run-time, passing the verbosity level document as a string. + startup time, passing the verbosity level document as a string. :program:`mongo` shell also provides the :method:`db.setLogLevel()` to set the log level for a single component. For various ways to set @@ -653,7 +682,7 @@ To support the :ref:`diagnostic data capture <3.2-diagnostic-data-capture>`, MongoDB introduces the following parameters: -.. note:: +.. note:: The default values for the diagnostic data capture interval and the maximum sizes are chosen to provide useful data to MongoDB engineers @@ -903,7 +932,7 @@ WiredTiger Parameters .. code-block:: javascript - db.adminCommand({ + db.adminCommand({ "setParameter": 1, "wiredTigerEngineRuntimeConfig": "