=============================
Release Notes for MongoDB 3.2
=============================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: twocols
*Dec 8, 2015*
MongoDB 3.2 is now available. Key features include WiredTiger as the
default storage engine, replication election enhancements, config
servers as replica sets, ``readConcern``, and document validations.
OpsManager 2.0 is also available. See the `Ops Manager documentation
`_ and the `Ops Manager
release notes
`_
for more information.
Minor Releases
--------------
.. class:: hidden
.. toctree::
/release-notes/3.2-changelog
.. _3.2.22-release-notes:
3.2.22 - Dec 28, 2018
~~~~~~~~~~~~~~~~~~~~~
- :issue:`SERVER-38425` Oplog Visibility Query is a collection scan in 3.2.21
- :ref:`3.2.22-changelog`
- `All JIRA issues closed in 3.2.22
`_
.. _3.2.21-release-notes:
3.2.21 - Sep 7, 2018
~~~~~~~~~~~~~~~~~~~~
- :issue:`SERVER-32999`: Platform Support: remove Debian 7.
- :issue:`SERVER-36010` Change log messages for Windows stacktraces to use error() or severe() rather than log().
- :issue:`SERVER-30724` Initial sync might miss ops that were in flight when it started.
- :ref:`3.2.21-changelog`
- `All JIRA issues closed in 3.2.21
`_
.. _3.2.20-release-notes:
3.2.20 - May 10, 2018
~~~~~~~~~~~~~~~~~~~~~
- :issue:`SERVER-32241`: applyOps reports success even when a nested
applyOps fails.
- :issue:`SERVER-32923`: Platform Support: remove SLES11 builds.
- :issue:`SERVER-31535`: Platform Support: remove Ubuntu 12.04 builds.
- :ref:`3.2.20-changelog`
- `All JIRA issues closed in 3.2.20
`_
.. _3.2.19-release-notes:
3.2.19 - Feb 6, 2018
~~~~~~~~~~~~~~~~~~~~
- :issue:`SERVER-30189`: Reduce calls to allocator for large $in expressions
- :issue:`SERVER-30853`: Update Mongod init scripts to set unlimited locked memory
- :issue:`SERVER-32001`: Unindexing a key in a partial unique index may cause server crash
- :issue:`SERVER-32048`: Updates using a numeric path component may cause index entries not to be created
- :ref:`3.2.19-changelog`
- `All JIRA issues closed in 3.2.19
`_
.. _3.2.18-release-notes:
3.2.18 - Nov 29, 2017
~~~~~~~~~~~~~~~~~~~~~
- :issue:`SERVER-29287`: Upgrade pcre to 8.41
- :issue:`SERVER-31101`: WT table not dropped after collection is dropped due to long-running OperationContext
- :issue:`SERVER-31149`: Enable recovery progress messages
- :ref:`3.2.18-changelog`
- `All JIRA issues closed in 3.2.18
`_
.. _3.2.17-release-notes:
3.2.17 - Sept 28, 2017
~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-30636`: RangeDeleter assert failed because of replication lag
- :issue:`SERVER-30943`: Segmentation fault on attempt to access an invalidated BSON Object in JS scope
- :issue:`WT-3327`: Checkpoints can hang if time runs backward
- :ref:`3.2.17-changelog`
- `All JIRA issues closed in 3.2.17
`_
.. _3.2.16-release-notes:
3.2.16 - Jul 27, 2017
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-26952`: Cache SCRAM-SHA-1 ClientKey
- :issue:`SERVER-28578`: When doing an upgrade from PV0 to PV1, we should not return from the reconfigure until the lastVote document is written.
- :issue:`SERVER-29568`: Enable configuration of OpenSSL cipher suite via :parameter:`setParameter `
- :ref:`3.2.16-changelog`
- `All JIRA issues closed in 3.2.16
`_
.. _3.2.15-release-notes:
3.2.15 - Jul 5, 2017
~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-29237`: Add ShardingTaskExecutorPoolMaxConnecting flag for :binary:`~bin.mongos`.
- :issue:`SERVER-29850`: Access violation due to a bug in internal page splitting in WiredTiger.
- :issue:`WT-3362`: Cursor opens should never block for the duration of a checkpoint.
- :ref:`3.2.15-changelog`
- `All JIRA issues closed in 3.2.15
`_
.. _3.2.14-release-notes:
3.2.14 -- Jun 13, 2017
~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-26452`: ``renameCollection`` should handle write conflicts.
- :issue:`SERVER-29365`: No-op ``applyOps`` does not wait for majority writeConcern before returning.
- :issue:`SERVER-28014`: When ssl mode is ``preferSSL``, should log
connections that do not use SSL.
- :ref:`3.2.14-changelog`
- `All JIRA issues closed in 3.2.14
`_
.. _3.2.13-release-notes:
3.2.13 -- May 1, 2017
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-3181`: Add ``nameOnly`` option to listDatabases to
only get db names, not size info.
- :issue:`SERVER-21818`: Capture system metrics in FTDC
- :issue:`SERVER-25318`: Limit total memory utilization for bulk index builds
- :ref:`3.2.13-changelog`
- `All JIRA issues closed in 3.2.13
`_
.. _3.2.12-release-notes:
3.2.12 -- Feb 1, 2017
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-27125` Arbiters in ``pv1`` should vote no in elections
if they can see a healthy primary of equal or greater priority to the
candidate.
- :issue:`SERVER-25012`: :dbcommand:`createIndex` blocks for duration
of checkpoint while holding locks.
- :issue:`SERVER-25865`: :pipeline:`$group` operation is slow on
Windows.
- :issue:`SERVER-26117`: If a collection is renamed on the sync source
while an :ref:`initial sync ` is running,
the initial sync process fails and restarts to avoid possible data
corruption. For details, see :ref:`init-sync-compatibility`.
- :ref:`3.2.12-changelog`
- `All JIRA issues closed in 3.2.12
`_
.. _3.2.11-release-notes:
3.2.11 -- Nov 18, 2016
~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-26182`: In a mixed version replica set with v3.2 and
v3.0 members, a sync of a v3.2 member from a v3.0 member can result
in a query response that exceed 16 MB BSON size limit and crash the
v3.2 member.
- :issue:`SERVER-24662`: Upgrade to Perl compatible regular expressions
(PCRE 8.39).
- :issue:`SERVER-26652` Invalid definitions in ``systemd`` configuration
for Debian.
- :issue:`SERVER-24386`: ``killCursor`` operation during aggregation
pipeline can cause segmentation fault.
- :ref:`3.2.11-changelog`
- `All JIRA issues closed in 3.2.11
`_
.. _3.2.10-release-notes:
3.2.10 -- Sep 30, 2016
~~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-25974`: When WT cache utilization is full, application
threads can stall for an extended period of time.
- :issue:`SERVER-20306`: MongoDB with WiredTiger may experience
excessive memory fragmentation, leading to swapping and/or
out-of-memory errors.
- :issue:`SERVER-16801`: When updating a field of one numerical type to
the same number of different numerical type, update operation
considers it as a noop.
- :ref:`3.2.10-changelog`
- `All JIRA issues closed in 3.2.10
`_
.. _3.2.9-release-notes:
3.2.9 -- Aug 16, 2016
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-7285`: Support systemd in future compatible Ubuntu distributions.
- :issue:`WT-2798`: Create operations on WiredTiger when journaling is disabled may
lead to inconsistent data in the event of a crash.
- :issue:`SERVER-17856`: On :binary:`~bin.mongod` instances, users can run
:dbcommand:`currentOp` and :dbcommand:`killOp` on own operations.
- :ref:`3.2.9-changelog`
- `All JIRA issues closed in 3.2.9
`_
.. _3.2.8-release-notes:
3.2.8 -- Jul 12, 2016
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-18329`: Debian 8(Jessie) packages.
- :issue:`SERVER-24580`: Improve performance when WiredTiger cache is
full.
- :issue:`WT-2696`: Race condition on unclean shutdown may miss log
records with large updates.
- :issue:`WT-2706`: Race condition on log file switch can cause missing
log records.
- :ref:`3.2.8-changelog`
- `All JIRA issues closed in 3.2.8
`_
.. _3.2.7-release-notes:
3.2.7 -- Jun 7, 2016
~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-24054`: JS segmentation fault on load of certain NaNs.
- :issue:`SERVER-24058`: Connection pool asio doesn't honor setup timeouts.
- :issue:`SERVER-24117`: Mongo binaries ELF stack has become executable.
- :ref:`3.2.7-changelog`
- `All JIRA issues closed in 3.2.7
`_
.. _3.2.6-release-notes:
3.2.6 -- Apr 28, 2016
~~~~~~~~~~~~~~~~~~~~~
- First production release of the :doc:`in-memory storage engine
`.
Issues fixed:
- :issue:`SERVER-22970`: Background index build may result in extra index
key entries that do not correspond to indexed documents.
- :issue:`SERVER-22043`: :binary:`~bin.mongo` shell method :method:`~cursor.count()`
ignores read preference.
- :ref:`3.2.6-changelog`
- `All JIRA issues closed in 3.2.6
`_
.. _3.2.5-release-notes:
3.2.5 -- Apr 14, 2016
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-22964`: IX GlobalLock held while waiting for
WiredTiger cache eviction.
- :issue:`SERVER-22831`: Low query rate with heavy cache pressure
and an idle collection.
- :issue:`SERVER-21681`: Include index size stats for in-memory storage
engine.
- :ref:`3.2.5-changelog`
- `All JIRA issues closed in 3.2.5
`_
.. _3.2.4-release-notes:
3.2.4 -- Mar 8, 2016
~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-22495`, :issue:`SERVER-22728`: Update optime when
running with journaling disabled.
- :issue:`SERVER-22269`: Have read concern ``majority`` reflect
journaled state on the primary
- :issue:`SERVER-22683`:
:setting:`replication.enableMajorityReadConcern` ignores actual
setting value and instead implies ``true``.
- :issue:`SERVER-22043`: :method:`~cursor.count()` method in the
:binary:`~bin.mongo` shell does not apply the read preferences.
- :ref:`3.2.4-changelog`
- `All JIRA issues closed in 3.2.4
`_
.. _3.2.3-release-notes:
3.2.3 -- Feb 17, 2016
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-22261`: For MMAPv1 journaling, the "last sequence
number" file (``lsn`` file) may be ahead of what is synced to the
data files.
- :issue:`SERVER-22167`: In some cases, insert operations fails to add
the ``_id`` field to large documents.
- :issue:`SERVER-22456`: Increased timeout for querying oplog to 1
minute.
- :ref:`3.2.3-changelog`
- `All JIRA issues closed in 3.2.3
`_
3.2.2 -- Feb 16, 2016
~~~~~~~~~~~~~~~~~~~~~
Replaced by MongoDB 3.2.3. Users wishing to
run MongoDB 3.2 should skip 3.2.2 and upgrade directly to 3.2.3.
.. _3.2.1-release-notes:
3.2.1 -- Jan 12, 2016
~~~~~~~~~~~~~~~~~~~~~
Issues fixed:
- :issue:`SERVER-21868`: During a regular shutdown of a replica set,
secondaries may mark certain replicated but yet to be applied
operations as successfully applied.
- :issue:`SERVER-20262`: Improve insert workload performance with
WiredTiger on Windows.
- :issue:`SERVER-21366`: Long-running transactions during chunk moves.
- :ref:`3.2.1-changelog`
- `All JIRA issues closed in 3.2.1
`_
WiredTiger as Default
---------------------
Starting in 3.2, MongoDB uses the WiredTiger as the default storage
engine.
To specify the MMAPv1 storage engine, you must specify the storage
engine setting either:
- On the command line with the ``--storageEngine`` option:
.. code-block:: sh
mongod --storageEngine mmapv1
- Or in a :doc:`configuration file `,
using the :setting:`storage.engine` setting:
.. code-block:: yaml
storage:
engine: mmapv1
.. note::
For existing deployments, if you do not specify the
``--storageEngine`` or the :setting:`storage.engine` setting,
MongoDB 3.2 can automatically determine the storage engine
used to create the data files in the ``--dbpath`` or
:setting:`storage.dbPath`.
If specifying ``--storageEngine`` or :setting:`storage.engine`,
:binary:`~bin.mongod` will not start if ``dbPath`` contains data files
created by a storage engine other than the one specified.
.. seealso:: :ref:`3.2-storage-engine-compatibility`
WiredTiger Default Cache Size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Starting in MongoDB 3.2, the WiredTiger internal cache, by default,
will use the larger of either:
- 60% of RAM minus 1 GB, or
- 1 GB.
For more information, see :ref:`WiredTiger and Memory Use
`.
WiredTiger Journal Write Frequency
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MongoDB 3.2 configures WiredTiger to write to the journal files at
every 50 milliseconds. This is in addition to the existing journal write
intervals and conditions. For more information, see :ref:`journal-process`.
.. _3.2-rel-notes-rs-enhancements:
Replication Election Enhancements
---------------------------------
Starting in MongoDB 3.2, MongoDB reduces replica set failover time
and accelerates the detection of multiple simultaneous primaries.
As part of this enhancement, MongoDB introduces a version 1 of the
replication protocol. New replica sets will, by default, use
:rsconf:`protocolVersion: 1 `. Previous versions of
MongoDB use version 0 of the protocol.
In addition, MongoDB introduces a new :doc:`replica set configuration
` option
:rsconf:`~settings.electionTimeoutMillis`.
:rsconf:`~settings.electionTimeoutMillis` specifies the time limit in
milliseconds for detecting when a replica set's primary is unreachable.
:rsconf:`~settings.electionTimeoutMillis` only applies if using the
version 1 of the :rsconf:`replication protocol `.
.. _3.2-rel-notes-sharded-cluster:
Sharded Cluster Enhancements
----------------------------
MongoDB 3.2 deprecates the use of three mirrored :binary:`~bin.mongod`
instances for config servers.
Instead, starting in 3.2, the :doc:`config servers
` for a sharded cluster can be
deployed as a replica set. The replica set config servers must run the
WiredTiger storage engine.
This change improves consistency across the config servers, since
MongoDB can take advantage of the standard replica set read and write
protocols for sharding config data. In addition, this allows a sharded
cluster to have more than 3 config servers since a replica set can have
up to 50 members.
For more information, see :doc:`/core/sharded-cluster-config-servers`.
To deploy a **new** sharded cluster with replica set config servers,
see :doc:`/tutorial/deploy-shard-cluster`.
.. include:: /includes/extracts/master-slave-deprecated-for-sharded-cluster.rst
Starting in 3.2, :binary:`~bin.mongos`, during its startup, will continue
to try to contact the config servers until one becomes available. In
previous versions, :binary:`~bin.mongos`, during its startup, would shut
down if it could not find a config server.
.. _3.2-rel-notes-readConcern:
``readConcern``
---------------
MongoDB 3.2 introduces the ``readConcern`` query option for replica sets and replica
set shards. For the :doc:`WiredTiger storage engine
`, the ``readConcern`` option allows clients to
choose a level of isolation for their reads. You can specify a
``readConcern`` of ``"majority"`` to read data that has been written to
a majority of nodes and thus cannot be rolled back. By default, MongoDB
uses a ``readConcern`` of ``"local"`` to return the most recent data
available to the node at the time of the query, even if the data has
not been persisted to a majority of nodes and may be rolled back. With
the :doc:`MMAPv1 storage engine `, you can only specify a
``readConcern`` of ``"local"``.
``readConcern`` requires MongoDB drivers updated for MongoDB 3.2.
.. include:: /includes/fact-readConcern-majority-protocolVersion.rst
For details on ``readConcern``, including operations that support the
option, see :doc:`/reference/read-concern`.
Partial Indexes
---------------
MongoDB 3.2 provides the option to create indexes that only index
the documents in a collection that meet a specified filter expression.
By indexing a subset of the documents in a collection, partial indexes
have lower storage requirements and reduced performance costs for index
creation and maintenance. You can specify a ``partialFilterExpression``
option for all MongoDB :ref:`index types `.
The ``partialFilterExpression`` option accepts a document that specifies the
condition using:
- equality expressions (i.e. ``field: value`` or using the :query:`$eq`
operator),
- :query:`$exists: true <$exists>` expression,
- :query:`$gt`, :query:`$gte`, :query:`$lt`, :query:`$lte` expressions,
- :query:`$type` expressions,
- :query:`$and` operator at the top-level only
For details, see :doc:`/core/index-partial`.
.. _3.2-rel-notes-document-validation:
Document Validation
-------------------
Starting in 3.2, MongoDB provides the capability to validate documents
during updates and insertions. Validation rules are specified on a
per-collection basis.
To specify document validation on a new collection, use the new
``validator`` option in the :method:`db.createCollection()` method. To
add document validation to an existing collection, use the new
``validator`` option in the :dbcommand:`collMod` command. For more
information, see :doc:`/core/document-validation`.
To view the validation specifications for a collection, use the
:method:`db.getCollectionInfos()` method.
The following operations can bypass validation per operation using the
new option ``bypassDocumentValidation``:
.. list-table::
:header-rows: 1
:class: border-table
* - Command
- ``mongo`` Shell Method
* - :dbcommand:`aggregate` when used with :pipeline:`$out`
- :method:`db.collection.aggregate()` when used with :pipeline:`$out`
* - :dbcommand:`applyOps`
-
* - :dbcommand:`cloneCollection`
-
* - :dbcommand:`clone`
-
* - :dbcommand:`copydb`
-
* - :dbcommand:`findAndModify`
- :method:`db.collection.findAndModify()`
* - :dbcommand:`insert`
-
* - :dbcommand:`mapReduce`
- :method:`db.collection.mapReduce()`
* - :dbcommand:`update`
-
For deployments that have enabled access control, you must have
:authaction:`bypassDocumentValidation` action. The built-in roles
:authrole:`dbAdmin` and :authrole:`restore` provide this action.
Aggregation Framework Enhancements
----------------------------------
MongoDB introduces:
- New stages, accumulators, and expressions.
- :ref:`Availability of accumulator expressions
<3.2-agg-accumulator-availability>` in :pipeline:`$project` stage.
- :ref:`Performance improvements <3.2-agg-shard-optimization>` on
sharded clusters.
New Aggregation Stages
~~~~~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
:widths: 10 40 50
* - Stage
- Description
- Syntax
* - :pipeline:`$sample`
- Randomly selects N documents from its input.
- ``{ $sample: { size: } }``
* - :pipeline:`$indexStats`
- Returns statistics on index usage.
- ``{ $indexStats: { } }``
* - :pipeline:`$lookup`
- Performs a left outer join with another collection.
- .. code-block:: none
{
$lookup:
{
from: ,
localField: ,
foreignField: ,
as: