Release Notes for MongoDB 2.6
April 8, 2014
MongoDB 2.6 is now available. Key features include aggregationenhancements, text-search integration, query-engine improvements, a newwrite-operation protocol, and security enhancements.
Minor Releases
- 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:SERVER-22261. - Fixed issue that permitted the creation of new role with the samename as a built-in role:SERVER-19284.
- Fixed issue where some index operations running during an active migrationmay cause the migration operation to skip some documents:SERVER-22535.
- All issues closed in 2.6.12
2.6.11 – Aug 12, 2015
- Improvements to query plan ranking SERVER-17815
- Improved ability for
mongos
to detect replica setfailover and correctly route read operations to the newprimary SERVER-18280 - Improved reporting of queries in
getMore
operation indb.currentOp()
and the databaseprofiler SERVER-16265 - All issues closed in 2.6.11
2.6.10 – May 19, 2015
- Improve user cache invalidation enforcement on
mongos
SERVER-11980 - Provide correct rollbacks for collection creationSERVER-18211
- Allow user inserts into the
system.profile
collectionSERVER-18211 - Fix to query system to ensure non-negation predicates get chosenover negation predicates for multikey index bounds constructionSERVER-18364
- All issues closed in 2.6.10
2.6.9 – March 24, 2015
- Resolve connection handling related crash with
mongos
instances SERVER-17441 - Add server parameter to configure idle cursor timeoutSERVER-8188
- Remove duplicated (orphan) documents from aggregation pipelines with
_id
queries in sharded clusters SERVER-17426 - Fixed crash in
geoNear
command queries with multiple2dsphere
indexes SERVER-14723 - All issues closed in 2.6.9
2.6.8 – February 25, 2015
- Add
listCollections
command functionality to 2.6 shelland client SERVER-17087 copydb
/clone
commands can crash theserver if a primary steps down SERVER-16599- Secondary fasserts trying to replicate an indexSERVER-16274
- Query optimizer should always use equality predicate over uniqueindex when possible SERVER-15802
- All issues closed in 2.6.8
2.6.7 – January 13, 2015
- Decreased
mongos
memory footprint when shards have severaltags SERVER-16683 - Removed check for shard version if the primary server is downSERVER-16237
- Fixed:
/etc/init.d/mongod
startup script failure with dirname messageSERVER-16081 - Fixed:
mongos
can cause shards to hit the in-memory sort limitby requesting more results than needed SERVER-14306 - All issues closed in 2.6.7
2.6.6 – December 09, 2014
- Fixed: Evaluating candidate query plans with concurrent writes on samecollection may crash
mongod
SERVER-15580 - Fixed: 2.6
mongod
crashes with segfault when added to a 2.8 replica setwith 12 or more members SERVER-16107 - Fixed:
$regex
,$in
and$sort
with index returns toomany results SERVER-15696 - Change:
moveChunk
will fail if there is data on the targetshard and a required index does not exist.SERVER-12472 - Primary should abort if encountered problems writing to the oplogSERVER-12058
- All issues closed in 2.6.6
2.6.5 – October 07, 2014
$rename
now uses correct dotted source paths SERVER-15029- Partially written journal last section does not affect recoverySERVER-15111
- Explicitly zero
.ns
files on creation SERVER-15369 - Plan ranker will no longer favor intersection plans if predicate generates empty rangeindex scan SERVER-14961
- Generate Community and Enterprise packages for SUSE 11SERVER-10642
- All issues closed in 2.6.5
2.6.4 – August 11, 2014
- Fix for
text
index where under specific circumstances, in-placeupdates to atext
-indexed field may result inincorrect/incomplete results SERVER-14738 - Check the size of the split point before performing a manual splitchunk operation SERVER-14431
- Ensure read preferences are re-evaluated by drawing secondaryconnections from a global pool and releasing back to the pool at theend of a query/command SERVER-9788
- Allow read from secondaries when both audit and authorization areenabled in a sharded cluster SERVER-14170
- All issues closed in 2.6.4
2.6.3 – June 19, 2014
- Equality queries on
_id
with projection may return no resultson sharded collections SERVER-14302. - Equality queries on
_id
with projection on_id
may returnorphan documents on sharded collections SERVER-14304. - All issues closed in 2.6.3.
2.6.2 – June 16, 2014
- Query plans with differing performance can tie during plan rankingSERVER-13675.
mongod
may terminate if x.509 authentication certificate is invalidSERVER-13753.- Temporary map/reduce collections are incorrectly replicated to secondariesSERVER-13981.
mongos
incorrectly targets multiple shards for nestedfield shard key predicates SERVER-14138.rs.stepDown()
during mapReduce causesfassert
whenwriting to op log SERVER-14186.
2.6.1 – May 5, 2014
- Fix to install MongoDB service on Windows with the
—install
option SERVER-13515. - Allow direct upgrade from 2.4.x to 2.6.0 via
yum
SERVER-13563. - Fix issues with background index builds on secondaries:SERVER-13589 and SERVER-13620.
- Redact credential information passed as startup optionsSERVER-13644.
- 2.6.1 Changelog.
- All issues closed in 2.6.1.
Major Changes
The following changes in MongoDB affect both the standard and Enterpriseeditions:
Aggregation Enhancements
The aggregation pipeline adds the ability to return result sets of anysize, either by returning a cursor or writing the output toa collection. Additionally, the aggregation pipeline supportsvariables and adds new operations to handle sets and redact data.
- The
db.collection.aggregate()
now returns a cursor, whichenables the aggregation pipeline to return result sets of any size. - Aggregation pipelines now support an
explain
operation to aidanalysis of aggregation operations. - Aggregation can now use a more efficient external-disk-based sortingprocess.
- New pipeline stages:
- New or modified operators:
Text Search Integration
Text search is now enabled by default, and the query system, includingthe aggregation pipeline $match
stage, includes the$text
operator, which resolves text-search queries.
MongoDB 2.6 includes an updated text index format and deprecates the text
command.
Insert and Update Improvements
Improvements to the update and insert systems include additionaloperations and improvements that increase consistency of modifieddata.
- MongoDB preserves the order of the document fields following writeoperations except for the following cases:
- The
_id
field is always the first field in the document. - Updates that include
renaming
of field names mayresult in the reordering of fields in the document.
- The
- New or enhanced update operators:
$bit
operator supports bitwisexor
operation.$min
and$max
operators that performconditional update depending on the relative size of the specifiedvalue and the current value of a field.$push
operator has enhanced support for the$sort
,$slice
, and$each
modifiersand supports a new$position
modifier.$currentDate
operator to set the value of a field to thecurrent date.
- The
$mul
operator for multiplicative increments for insertand update operations.
See also
Update Operator Syntax Validation
New Write Operation Protocol
A new write protocol integrates write operations withwrite concerns. The protocol also provides improvedsupport for bulk operations.
MongoDB 2.6 adds the write commands insert
,update
, and delete
, which provide the basisfor the improved bulk insert. All officially supported MongoDB driverssupport the new write commands.
The mongo
shell now includesmethods to perform bulk-write operations. See Bulk()
formore information.
See also
MSI Package for MongoDB Available for Windows
MongoDB now distributes MSI packages for Microsoft Windows. This is therecommended method for MongoDB installation under Windows.
Security Improvements
MongoDB 2.6 enhances support for secure deployments through improved SSLsupport, x.509-based authentication, an improved authorization systemwith more granular controls, as well as centralized credential storage, andimproved user management tools.
Specifically these changes include:
- A new authorization model that provides theability to create custom User-Defined Roles and the ability tospecify user privileges at a collection-level granularity.
- Global user management, which stores all user anduser-defined role data in the
admin
database and provides a newset of commands for managing users and roles. - x.509 certificate authentication for client authentication as well as forinternal authentication of sharded cluster and/orreplica set members. x.509 authentication is only availablefor deployments using SSL.
- Enhanced SSL Support:
- Rolling upgrades of clusters to use SSL.
- MongoDB Tools support connections to
mongod
andmongos
instances using SSLconnections. - Prompt for passphraseby
mongod
ormongos
at startup. - Require the use of strong SSL ciphers, with a minimum 128-bit keylength for all connections. The strong-cipher requirement preventsan old or malicious client from forcing use of a weak cipher.
- MongoDB disables the http interface by default, limitingnetwork exposure. To enable theinterface, see
enabled
.
See also
New Authorization Model,SSL Certificate Hostname Validation,and Security Checklist.
Query Engine Improvements
- MongoDB can now use index intersection to fulfill queries supported by morethan one index.
- Index Filters to limit which indexes can become the winningplan for a query.
- Query Plan Cache Methods methods to view and clear thequery plans cached by the query optimizer.
- MongoDB can now use
count()
withhint()
. Seecount()
for details.
Improvements
Geospatial Enhancements
- 2dsphere indexes version 2.
- Support for MultiPoint,MultiLineString, MultiPolygon, andGeometryCollection.
- Support for geospatial query clauses in
$or
expressions.
See also
2dsphere Index Version 2,$maxDistance Changes,Deprecated $uniqueDocs,Stronger Validation of Geospatial Queries
Index Build Enhancements
Background index build allowed onsecondaries. If you initiate a background index build on aprimary, the secondaries will replicate the index build inthe background.
Automatic rebuild of interrupted index builds after a restart.
- If a standalone or a primary instance terminates during an indexbuild without a clean shutdown,
mongod
now restartsthe index build when the instance restarts. If the instance shutsdown cleanly or if a user kills the index build, the interruptedindex builds do not automatically restart upon the restart of theserver. - If a secondary instance terminates during an index build, the
mongod
instance will now restart the interrupted indexbuild when the instance restarts.To disable this behavior, use the—noIndexBuildRetry
command-line option.
- If a standalone or a primary instance terminates during an indexbuild without a clean shutdown,
ensureIndex()
now wraps a newcreateIndex
command.The
dropDups
option toensureIndex()
andcreateIndex
is deprecated.
See also
Enforce Index Key Length Limit
Enhanced Sharding and Replication Administration
- New
cleanupOrphaned
command to remove orphaneddocuments from a shard. - New
mergeChunks
command to combine contiguous chunkslocated on a single shard. SeemergeChunks
andMerge Chunks in a Sharded Cluster. - New
rs.printReplicationInfo()
andrs.printSlaveReplicationInfo()
methods to provide aformatted report of the status of a replica set from the perspectiveof the primary and the secondary, respectively.
Configuration Options YAML File Format
MongoDB 2.6 supports a YAML-based configuration file format in additionto the previous configuration file format. See the documentation ofthe Configuration File formore information.
Operational Changes
Storage
usePowerOf2Sizes
is now the default allocation strategy forall new collections. The new allocation strategy uses more storagerelative to total document size but results in lower levels ofstorage fragmentation and more predictable storage capacity planningover time.
To use the previous exact-fit allocation strategy:
For a specific collection, use
collMod
withusePowerOf2Sizes
set tofalse
.For all new collections on an entire
mongod
instance,setnewCollectionsUsePowerOf2Sizes
tofalse
.
New collections include those: created duringinitial sync, as well as thosecreated by the mongorestore
and mongoimport
tools, by running mongod
with the —repair
option, as well as therestoreDatabase
command.
See /core/storage for more information about MongoDB’s storage system.
Networking
- Removed upward limit for the
maxIncomingConnections
formongod
andmongos
. Previous versions capped the maximum possiblemaxIncomingConnections
setting at20,000
connections. - Connection pools for a
mongos
instance may be used by multipleMongoDB servers. This can reduce the number of connections neededfor high-volume workloads and reduce resource consumption insharded clusters. - The C++ driver now monitors replica set health with the
isMaster
command instead ofreplSetGetStatus
. This allows the C++ driver to supportsystems that require authentication. - New
cursor.maxTimeMS()
and correspondingmaxTimeMS
option for commands to specify a time limit.
Tool Improvements
mongo
shell supports a global /etc/mongorc.js.- All MongoDB executable files now supportthe
—quiet
option to suppress all logging output except forerror messages. mongoimport
uses the input filename, without the fileextension if any, as the collection name if run without the-c
or—collection
specification.mongoexport
can now constrain export data using—skip
and—limit
, as well as order the documentsin an export using the—sort
option.mongostat
can support the use of—rowcount
(-n
) with the—discover
option to produce thespecified number of output lines.- Add strict mode representation for
data_numberlong
foruse bymongoexport
andmongoimport
.
MongoDB Enterprise Features
The following changes are specific to MongoDB Enterprise Editions:
MongoDB Enterprise for Windows
MongoDB Enterprise for Windows is now available. Itincludes support for Kerberos, SSL, and SNMP.
MongoDB Enterprise for Windows does not include LDAP support forauthentication. However, MongoDB Enterprise for Linux supports usingLDAP authentication with an ActiveDirectory server.
MongoDB Enterprise for Windows includes OpenSSL version 1.0.1g.
Auditing
MongoDB Enterprise adds auditing capability formongod
and mongos
instances. See Auditingfor details.
LDAP Support for Authentication
MongoDB Enterprise provides support for proxy authentication of users.This allows administrators to configure a MongoDB cluster toauthenticate users by proxying authentication requests to a specifiedLightweight Directory Access Protocol (LDAP) service. SeeAuthenticate Using SASL and LDAP with OpenLDAP andAuthenticate Using SASL and LDAP with ActiveDirectory for details.
MongoDB Enterprise for Windows does not include LDAP support forauthentication. However, MongoDB Enterprise for Linux supports usingLDAP authentication with an ActiveDirectory server.
MongoDB does not support LDAP authentication in mixed shardedcluster deployments that contain both version 2.4 and version 2.6shards. See Upgrade MongoDB to 2.6 for upgrade instructions.
Expanded SNMP Support
MongoDB Enterprise has greatly expanded its SNMP support to provideSNMP access to nearly the full range of metrics provided bydb.serverStatus()
.
See also
Additional Information
Changes Affecting Compatibility
- Compatibility Changes in MongoDB 2.6
- Index Changes
- Write Method Acknowledgements
db.collection.aggregate()
Change- Write Concern Validation
- Security Changes
2dsphere
Index Version 2- Log Messages
- Package Configuration Changes
- Remove Method Signature Change
- Update Operator Syntax Validation
- Updates Enforce Field Name Restrictions
- Query and Sort Changes
- Replica Set/Sharded Cluster Validation
- Time Format Changes
- Other Resources
Some changes in 2.6 can affect compatibility and may require user actions. The2.6 mongo
shell provides adb.upgradeCheckAllDBs() method to perform a check for upgradepreparedness for some of these changes.
See Compatibility Changes in MongoDB 2.6 for a detailed list ofcompatibility changes.
See also
All Backwards incompatible changes (JIRA)%20AND%20%22Backwards%20Compatibility%22%20in%20(%20%22Minor%20Change%22%2C%22Major%20Change%22%20)%20ORDER%20BY%20votes%20DESC%2C%20issuetype%20DESC%2C%20key%20DESC).
Upgrade Process
- Upgrade MongoDB to 2.6
- Upgrade User Authorization Data to 2.6 Format
- Downgrade MongoDB from 2.6
- Downgrade Recommendations and Checklist
- Downgrade 2.6 User Authorization Model
- Considerations
- Access Control Prerequisites
- Procedure
- Connect and authenticate to MongoDB instance.
- Create backup of 2.6
admin.system.users
collection. - Update the version document for the
authSchema
. - Remove existing documents from the
admin.system.users
collection. - Copy documents from the
admin.system.backup_users
collection. - Update the version document for the
authSchema
.
- Result
- Downgrade Updated Indexes
- Downgrade MongoDB Processes
- Downgrade Procedure
See Upgrade MongoDB to 2.6 for full upgrade instructions.
Download
To download MongoDB 2.6, go to the downloads page.