============================= Release Notes for MongoDB 2.6 ============================= .. default-domain:: mongodb .. contents:: On this page :local: :backlinks: none :depth: 1 :class: twocols *April 8, 2014* MongoDB 2.6 is now available. Key features include aggregation enhancements, text-search integration, query-engine improvements, a new write-operation protocol, and security enhancements. Minor Releases -------------- .. class:: hidden .. toctree:: /release-notes/2.6-changelog 2.6.12 -- Mar 24, 2016 ~~~~~~~~~~~~~~~~~~~~~~ - Fixed issue with MMAPv1 journaling where the "last sequence number" file (``lsn`` file) may be ahead of what is synced to the data files: :issue:`SERVER-22261`. - Fixed issue that permitted the creation of new role with the same name as a :doc:`built-in role `: :issue:`SERVER-19284`. - Fixed issue where some index operations running during an active migration may cause the migration operation to skip some documents: :issue:`SERVER-22535`. - `All issues closed in 2.6.12 `_ 2.6.11 -- Aug 12, 2015 ~~~~~~~~~~~~~~~~~~~~~~ - Improvements to query plan ranking :issue:`SERVER-17815` - Improved ability for :binary:`~bin.mongos` to detect replica set failover and correctly route read operations to the new primary :issue:`SERVER-18280` - Improved reporting of queries in ``getMore`` operation in :method:`db.currentOp()` and the database profiler :issue:`SERVER-16265` - `All issues closed in 2.6.11 `_ 2.6.10 -- May 19, 2015 ~~~~~~~~~~~~~~~~~~~~~~ - Improve user cache invalidation enforcement on :binary:`~bin.mongos` :issue:`SERVER-11980` - Provide correct rollbacks for collection creation :issue:`SERVER-18211` - Allow user inserts into the :data:`system.profile` collection :issue:`SERVER-18211` - Fix to query system to ensure non-negation predicates get chosen over negation predicates for multikey index bounds construction :issue:`SERVER-18364` - `All issues closed in 2.6.10 `_ 2.6.9 -- March 24, 2015 ~~~~~~~~~~~~~~~~~~~~~~~ - Resolve connection handling related crash with :binary:`~bin.mongos` instances :issue:`SERVER-17441` - Add server parameter to configure idle cursor timeout :issue:`SERVER-8188` - Remove duplicated (orphan) documents from aggregation pipelines with ``_id`` queries in sharded clusters :issue:`SERVER-17426` - Fixed crash in :dbcommand:`geoNear` queries with multiple ``2dsphere`` indexes :issue:`SERVER-14723` - `All issues closed in 2.6.9 `_ 2.6.8 -- February 25, 2015 ~~~~~~~~~~~~~~~~~~~~~~~~~~ - Add :dbcommand:`listCollections` command functionality to 2.6 shell and client :issue:`SERVER-17087` - :dbcommand:`copydb`/\ :dbcommand:`clone` commands can crash the server if a primary steps down :issue:`SERVER-16599` - Secondary fasserts trying to replicate an index :issue:`SERVER-16274` - Query optimizer should always use equality predicate over unique index when possible :issue:`SERVER-15802` - `All issues closed in 2.6.8 `_ 2.6.7 -- January 13, 2015 ~~~~~~~~~~~~~~~~~~~~~~~~~~ - Decreased :binary:`~bin.mongos` memory footprint when shards have several tags :issue:`SERVER-16683` - Removed check for shard version if the primary server is down :issue:`SERVER-16237` - Fixed: ``/etc/init.d/mongod`` startup script failure with dirname message :issue:`SERVER-16081` - Fixed: :binary:`~bin.mongos` can cause shards to hit the in-memory sort limit by requesting more results than needed :issue:`SERVER-14306` - `All issues closed in 2.6.7 `_ 2.6.6 -- December 09, 2014 ~~~~~~~~~~~~~~~~~~~~~~~~~~ - Fixed: Evaluating candidate query plans with concurrent writes on same collection may crash :binary:`~bin.mongod` :issue:`SERVER-15580` - Fixed: 2.6 :binary:`~bin.mongod` crashes with segfault when added to a 2.8 replica set with 12 or more members :issue:`SERVER-16107` - Fixed: :query:`$regex`, :query:`$in` and :query:`$sort` with index returns too many results :issue:`SERVER-15696` - Change: :dbcommand:`moveChunk` will fail if there is data on the target shard and a required index does not exist. :issue:`SERVER-12472` - Primary should abort if encountered problems writing to the oplog :issue:`SERVER-12058` - `All issues closed in 2.6.6 `_ 2.6.5 -- October 07, 2014 ~~~~~~~~~~~~~~~~~~~~~~~~~ - :query:`$rename` now uses correct dotted source paths :issue:`SERVER-15029` - Partially written journal last section does not affect recovery :issue:`SERVER-15111` - Explicitly zero ``.ns`` files on creation :issue:`SERVER-15369` - Plan ranker will no longer favor intersection plans if predicate generates empty range index scan :issue:`SERVER-14961` - Generate Community and Enterprise packages for SUSE 11 :issue:`SERVER-10642` - `All issues closed in 2.6.5 `_ 2.6.4 -- August 11, 2014 ~~~~~~~~~~~~~~~~~~~~~~~~ - Fix for ``text`` index where under specific circumstances, in-place updates to a ``text``-indexed field may result in incorrect/incomplete results :issue:`SERVER-14738` - Check the size of the split point before performing a manual split chunk operation :issue:`SERVER-14431` - Ensure read preferences are re-evaluated by drawing secondary connections from a global pool and releasing back to the pool at the end of a query/command :issue:`SERVER-9788` - Allow read from secondaries when both audit and authorization are enabled in a sharded cluster :issue:`SERVER-14170` - `All issues closed in 2.6.4 `_ 2.6.3 -- June 19, 2014 ~~~~~~~~~~~~~~~~~~~~~~ - Equality queries on ``_id`` with projection may return no results on sharded collections :issue:`SERVER-14302`. - Equality queries on ``_id`` with projection on ``_id`` may return orphan documents on sharded collections :issue:`SERVER-14304`. - `All issues closed in 2.6.3 `_. 2.6.2 -- June 16, 2014 ~~~~~~~~~~~~~~~~~~~~~~ - Query plans with differing performance can tie during plan ranking :issue:`SERVER-13675`. - :binary:`~bin.mongod` may terminate if x.509 authentication certificate is invalid :issue:`SERVER-13753`. - Temporary map/reduce collections are incorrectly replicated to secondaries :issue:`SERVER-13981`. - :binary:`~bin.mongos` incorrectly targets multiple shards for nested field shard key predicates :issue:`SERVER-14138`. - :method:`rs.stepDown()` during mapReduce causes ``fassert`` when writing to op log :issue:`SERVER-14186`. .. - :ref:`2.6.2 Changelog <2.6.2-changelog>`. - `All issues closed in 2.6.2 `_. 2.6.1 -- May 5, 2014 ~~~~~~~~~~~~~~~~~~~~ - Fix to install MongoDB service on Windows with the ``--install`` option :issue:`SERVER-13515`. - Allow direct upgrade from 2.4.x to 2.6.0 via ``yum`` :issue:`SERVER-13563`. - Fix issues with background index builds on secondaries: :issue:`SERVER-13589` and :issue:`SERVER-13620`. - Redact credential information passed as startup options :issue:`SERVER-13644`. - :ref:`2.6.1 Changelog <2.6.1-changelog>`. - `All issues closed in 2.6.1 `_. Major Changes ------------- The following changes in MongoDB affect both the standard and Enterprise editions: .. _rn-2.6-aggregation-cursor: Aggregation Enhancements ~~~~~~~~~~~~~~~~~~~~~~~~ The aggregation pipeline adds the ability to return result sets of any size, either by returning a cursor or writing the output to a collection. Additionally, the aggregation pipeline supports variables and adds new operations to handle sets and redact data. - The :method:`db.collection.aggregate()` now returns a cursor, which enables the aggregation pipeline to return result sets of any size. - Aggregation pipelines now support an ``explain`` operation to aid analysis of aggregation operations. - Aggregation can now use a more efficient external-disk-based sorting process. - New pipeline stages: - :pipeline:`$out` stage to output to a collection. - :pipeline:`$redact` stage to allow additional control to accessing the data. - New or modified operators: - :ref:`set expression operators `. - :expression:`$let` and :expression:`$map` operators to allow for the use of variables. - :expression:`$literal` operator and :expression:`$size` operator. - :expression:`$cond` expression now accepts either an object or an array. .. _rel-notes-text-query-operator: Text Search Integration ~~~~~~~~~~~~~~~~~~~~~~~ Text search is now enabled by default, and the query system, including the aggregation pipeline :pipeline:`$match` stage, includes the :query:`$text` operator, which resolves text-search queries. MongoDB 2.6 includes an updated :doc:`text index ` format and deprecates the :dbcommand:`text` command. .. _rel-notes-data-modification: Insert and Update Improvements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Improvements to the update and insert systems include additional operations and improvements that increase consistency of modified data. - .. include:: /includes/fact-update-field-order.rst :start-after: order-of-document-fields :end-before: .. versionchanged - New or enhanced update operators: - :update:`$bit` operator supports bitwise ``xor`` operation. - :update:`$min` and :update:`$max` operators that perform conditional update depending on the relative size of the specified value and the current value of a field. - :update:`$push` operator has enhanced support for the :update:`$sort`, :update:`$slice`, and :update:`$each` modifiers and supports a new :update:`$position` modifier. - :update:`$currentDate` operator to set the value of a field to the current date. - The :update:`$mul` operator for multiplicative increments for insert and update operations. .. seealso:: :ref:`update-operations-incompatibility` .. _rel-notes-write-operations: New Write Operation Protocol ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A new write protocol integrates write operations with write concerns. The protocol also provides improved support for bulk operations. MongoDB 2.6 adds the write commands :dbcommand:`insert`, :dbcommand:`update`, and :dbcommand:`delete`, which provide the basis for the improved bulk insert. All officially supported MongoDB drivers support the new write commands. The :binary:`~bin.mongo` shell now includes methods to perform bulk-write operations. See :method:`Bulk()` for more information. .. seealso:: :ref:`write-methods-incompatibility` MSI Package for MongoDB Available for Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MongoDB now distributes MSI packages for Microsoft Windows. This is the recommended method for MongoDB installation under Windows. .. _2.6-relnotes-security: Security Improvements --------------------- MongoDB 2.6 enhances support for secure deployments through improved SSL support, x.509-based authentication, an improved authorization system with more granular controls, as well as centralized credential storage, and improved user management tools. Specifically these changes include: - A new :ref:`authorization model ` that provides the ability to create custom :ref:`user-defined-roles` and the ability to specify user privileges at a collection-level granularity. - Global user management, which stores all user and user-defined role data in the ``admin`` database and provides a new set of commands for managing users and roles. - x.509 certificate authentication for :doc:`client authentication ` as well as for :doc:`internal authentication ` of sharded cluster and/or replica set members. x.509 authentication is only available for deployments using SSL. - Enhanced SSL Support: - :doc:`Rolling upgrades of clusters ` to use SSL. - :ref:`mongodb-tools-support-ssl` support connections to :binary:`~bin.mongod` and :binary:`~bin.mongos` instances using SSL connections. - :ref:`Prompt for passphrase ` by :binary:`~bin.mongod` or :binary:`~bin.mongos` at startup. - Require the use of strong SSL ciphers, with a minimum 128-bit key length for all connections. The strong-cipher requirement prevents an old or malicious client from forcing use of a weak cipher. - MongoDB disables the http interface by default, limiting :doc:`network exposure `. To enable the interface, see :setting:`~net.http.enabled`. .. seealso:: :ref:`authentication-incompatibility`, :ref:`ssl-hostname-validation`, and :doc:`/administration/security-checklist`. Query Engine Improvements ------------------------- - MongoDB can now use :doc:`index intersection ` to fulfill queries supported by more than one index. - :ref:`index-filters` to limit which indexes can become the winning plan for a query. - :doc:`/reference/method/js-plan-cache` methods to view and clear the :doc:`query plans ` cached by the query optimizer. - MongoDB can now use :method:`~cursor.count()` with :method:`~cursor.hint()`. See :method:`~cursor.count()` for details. Improvements ------------ Geospatial Enhancements ~~~~~~~~~~~~~~~~~~~~~~~ - :ref:`2dsphere indexes version 2 <2dsphere-v2>`. - Support for :ref:`geojson-multipoint`, :ref:`geojson-multilinestring`, :ref:`geojson-multipolygon`, and :ref:`geojson-geometrycollection`. - Support for geospatial query clauses in :query:`$or` expressions. .. seealso:: :ref:`2.6-2dsphere-version-incompatibility`, :ref:`2.6-geo-maxDistance-incompatibility`, :ref:`2.6-uniqueDocs-incompatibility`, :ref:`2.6-geospatial-validation-incompatibility` Index Build Enhancements ~~~~~~~~~~~~~~~~~~~~~~~~ - :ref:`Background index build ` allowed on secondaries. If you initiate a background index build on a :term:`primary`, the secondaries will replicate the index build in the background. - Automatic rebuild of interrupted index builds after a restart. - If a standalone or a primary instance terminates during an index build *without a clean shutdown*, :binary:`~bin.mongod` now restarts the index build when the instance restarts. If the instance shuts down cleanly or if a user kills the index build, the interrupted index builds do not automatically restart upon the restart of the server. - If a secondary instance terminates during an index build, the :binary:`~bin.mongod` instance will now restart the interrupted index build when the instance restarts. To disable this behavior, use the :option:`--noIndexBuildRetry ` command-line option. - :method:`~db.collection.ensureIndex()` now wraps a new :dbcommand:`createIndex` command. - The ``dropDups`` option to :method:`~db.collection.ensureIndex()` and :dbcommand:`createIndex` is deprecated. .. seealso:: :ref:`2.6-index-key-length-incompatibility` Enhanced Sharding and Replication Administration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - New :dbcommand:`cleanupOrphaned` command to remove :term:`orphaned documents ` from a shard. - New :dbcommand:`mergeChunks` command to combine contiguous chunks located on a single shard. See :dbcommand:`mergeChunks` and :doc:`/tutorial/merge-chunks-in-sharded-cluster`. - New :method:`rs.printReplicationInfo()` and :method:`rs.printSlaveReplicationInfo()` methods to provide a formatted report of the status of a replica set from the perspective of the primary and the secondary, respectively. Configuration Options YAML File Format ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MongoDB 2.6 supports a YAML-based configuration file format in addition to the previous configuration file format. See the documentation of the :doc:`Configuration File ` for more information. Operational Changes ------------------- Storage ~~~~~~~ :collflag:`usePowerOf2Sizes` is now the default allocation strategy for all new collections. The new allocation strategy uses more storage relative to total document size but results in lower levels of storage fragmentation and more predictable storage capacity planning over time. To use the previous *exact-fit allocation strategy*: - For a specific collection, use :dbcommand:`collMod` with :collflag:`usePowerOf2Sizes` set to ``false``. - For all new collections on an entire :binary:`~bin.mongod` instance, set :parameter:`newCollectionsUsePowerOf2Sizes` to ``false``. New collections include those: created during :ref:`initial sync `, as well as those created by the :binary:`~bin.mongorestore` and :binary:`~bin.mongoimport` tools, by running :binary:`~bin.mongod` with the :option:`--repair ` option, as well as the :dbcommand:`restoreDatabase` command. See :v2.6:`/core/storage` for more information about MongoDB's storage system. Networking ~~~~~~~~~~ - Removed upward limit for the :setting:`~net.maxIncomingConnections` for :binary:`~bin.mongod` and :binary:`~bin.mongos`. Previous versions capped the maximum possible :setting:`~net.maxIncomingConnections` setting at ``20,000`` connections. - Connection pools for a :binary:`~bin.mongos` instance may be used by multiple MongoDB servers. This can reduce the number of connections needed for high-volume workloads and reduce resource consumption in sharded clusters. - The C++ driver now monitors :term:`replica set` health with the :dbcommand:`isMaster` command instead of :dbcommand:`replSetGetStatus`. This allows the C++ driver to support systems that require authentication. - New :method:`cursor.maxTimeMS()` and corresponding ``maxTimeMS`` option for commands to specify a time limit. Tool Improvements ~~~~~~~~~~~~~~~~~ - :binary:`~bin.mongo` shell supports a global :ref:`/etc/mongorc.js `. - All MongoDB :doc:`executable files ` now support the ``--quiet`` option to suppress all logging output except for error messages. - :binary:`~bin.mongoimport` uses the input filename, without the file extension if any, as the collection name if run without the ``-c`` or ``--collection`` specification. - :binary:`~bin.mongoexport` can now constrain export data using :option:`--skip ` and :option:`--limit `, as well as order the documents in an export using the :option:`--sort ` option. - :binary:`~bin.mongostat` can support the use of :option:`--rowcount ` (:option:`-n `) with the :option:`--discover ` option to produce the specified number of output lines. - Add strict mode representation for :bsontype:`data_numberlong` for use by :binary:`~bin.mongoexport` and :binary:`~bin.mongoimport`. MongoDB Enterprise Features --------------------------- The following changes are specific to MongoDB Enterprise Editions: MongoDB Enterprise for Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :doc:`MongoDB Enterprise for Windows ` is now available. It includes support for Kerberos, SSL, and SNMP. MongoDB Enterprise for Windows does **not** include LDAP support for authentication. However, MongoDB Enterprise for Linux supports using LDAP authentication with an ActiveDirectory server. MongoDB Enterprise for Windows includes OpenSSL version 1.0.1g. Auditing ~~~~~~~~ MongoDB Enterprise adds :doc:`auditing ` capability for :binary:`~bin.mongod` and :binary:`~bin.mongos` instances. See :ref:`auditing` for details. .. _relnotes-ldap-authentication: LDAP Support for Authentication ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MongoDB Enterprise provides support for proxy authentication of users. This allows administrators to configure a MongoDB cluster to authenticate users by proxying authentication requests to a specified Lightweight Directory Access Protocol (LDAP) service. See :doc:`/tutorial/configure-ldap-sasl-openldap` and :doc:`/tutorial/configure-ldap-sasl-activedirectory` for details. MongoDB Enterprise for Windows does **not** include LDAP support for authentication. However, MongoDB Enterprise for Linux supports using LDAP authentication with an ActiveDirectory server. MongoDB does **not** support LDAP authentication in mixed sharded cluster deployments that contain both version 2.4 and version 2.6 shards. See :doc:`/release-notes/2.6-upgrade` for upgrade instructions. Expanded SNMP Support ~~~~~~~~~~~~~~~~~~~~~ MongoDB Enterprise has greatly expanded its SNMP support to provide SNMP access to nearly the full range of metrics provided by :method:`db.serverStatus()`. .. seealso:: :ref:`2.6-snmp-iana-mib-incompatibility` Additional Information ---------------------- Changes Affecting Compatibility ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. class:: hidden .. toctree:: /release-notes/2.6-compatibility Some changes in 2.6 can affect :doc:`compatibility ` and may require user actions. The 2.6 :binary:`~bin.mongo` shell provides a :v2.6:`db.upgradeCheckAllDBs() ` method to perform a check for upgrade preparedness for some of these changes. See :doc:`/release-notes/2.6-compatibility` for a detailed list of compatibility changes. .. seealso:: `All Backwards incompatible changes (JIRA) `_. Upgrade Process ~~~~~~~~~~~~~~~ .. class:: hidden .. toctree:: /release-notes/2.6-upgrade /release-notes/2.6-upgrade-authorization /release-notes/2.6-downgrade See :doc:`/release-notes/2.6-upgrade` for full upgrade instructions. Download ~~~~~~~~ To download MongoDB 2.6, go to the `downloads page`_. .. TODO Should we add link to the installation guides? .. _`downloads page`: http://www.mongodb.org/downloads Other Resources ~~~~~~~~~~~~~~~ - `All JIRA issues resolved in 2.6 `_. - `All Third Party License Notices `_.