[MongoDB]: MongoDB 2.6
MongoDB 2.6
MongoDB 2.6 has Key features include aggregation enhancements, text-search integration, query-engine improvements, a new write-operation protocol, and security enhancements.
MMS 1.4, which includes On-Prem Backup in addition to Monitoring, is now also available. See MMS 1.4 documentation and the MMS 1.4 release notes for more information.
Major Changes
The following changes in MongoDB affect both the standard and Enterprise editions:
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 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:
- New or modified operators:
Text Search Integration
Text search is now enabled by default, and the query system, including the aggregation pipeline $matchstage, 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 additional operations and improvements that increase consistency of modified data.
- MongoDB preserves the order of the document fields following write operations except for the following cases:
- The _id field is always the first field in the document.
- Updates that include renaming of field names may result in the reordering of fields in the document.
- New or enhanced update operators:
- $bit operator supports bitwise xor operation.
- $min and $max operators that perform conditional update depending on the relative size of the specified value and the current value of a field.
- $push operator has enhanced support for the $sort, $slice, and $each modifiers and supports a new $position modifier.
- $currentDate operator to set the value of a field to the current date.
- The $mul operator for multiplicative increments for insert and update operations.
SEE ALSO
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 insert, update, and delete, which provide the basis for the improved bulk insert. All officially supported MongoDB drivers support the new write commands.
The mongo shell now includes methods to perform bulk-write operations. See Bulk() for more information.
SEE ALSO
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.
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 authorization model that provides the ability to create custom 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 client authentication as well as for internal authentication of sharded and/or replica set cluster members. x.509 authentication is only available for deployments using SSL.
- Enhanced SSL Support:
- Rolling upgrades of clusters to use SSL.
- MongoDB Tools support connections to mongod and mongos instances using SSL connections.
- Prompt for passphrase by mongod or 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 network exposure. To enable the interface, see enabled.
Query Engine Improvements
- MongoDB can now use index intersection to fulfill queries supported by more than one index.
- Index Filters to limit which indexes can become the winning plan for a query.
- Query Plan Cache Methods methods to view and clear the query plans cached by the query optimizer.
- MongoDB can now use count() with hint(). See count() for details.
Improvements
Geospatial Enhancements
- 2dsphere indexes version 2.
- Support for MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection.
- Support for geospatial query clauses in $or expressions.
Index Build Enhancements
-
Background index build allowed on secondaries. If you initiate a background index build on a 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,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 mongod instance will now restart the interrupted index build when the instance restarts.
To disable this behavior, use the –noIndexBuildRetry command-line option.
-
ensureIndex() now wraps a new createIndex command.
-
The dropDups option to ensureIndex() and createIndex is deprecated.
SEE ALSO
Enhanced Sharding and Replication Administration
- New cleanupOrphaned command to remove orphaned documents from a shard.
- New mergeChunks command to combine contiguous chunks located on a single shard. SeemergeChunks and Merge Chunks in a Sharded Cluster.
- New rs.printReplicationInfo() and 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 Configuration File for more information.
Operational Changes
Storage
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 collMod with usePowerOf2Sizes set to false.
-
For all new collections on an entire mongod instance, set newCollectionsUsePowerOf2Sizesto false.
New collections include those: created during initial sync, as well as those created by themongorestore and mongoimport tools, by running mongod with the –repair option, as well as the restoreDatabase command.
See Storage for more information about MongoDB’s storage system.
Networking
- Removed upward limit for the maxIncomingConnections for mongod and mongos. Previous versions capped the maximum possible maxIncomingConnections setting at 20,000 connections.
- Connection pools for a 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 replica set health with the isMaster command instead ofreplSetGetStatus. This allows the C++ driver to support systems that require authentication.
- New cursor.maxTimeMS() and corresponding maxTimeMS option for commands to specify a time limit.
Tool Improvements
- mongo shell supports a global /etc/mongorc.js.
- All MongoDB executable files now support the --quiet option to suppress all logging output except for error messages.
- mongoimport uses the input filename, without the file extension 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 documents in an export using the –sort option.
- mongostat can support the use of –rowcount (-n) with the –discover option to produce the specified number of output lines.
- Add strict mode representation for data_numberlong for use by mongoexport and mongoimport.
MongoDB Enterprise Features
The following changes are specific to MongoDB Enterprise Editions:
MongoDB Enterprise for Windows
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 auditing capability for mongod and mongos instances. See Auditing for details.
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 Authenticate Using SASL and LDAP with OpenLDAP and Authenticate Using SASL and LDAP with 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 Upgrade MongoDB to 2.6 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 db.serverStatus().
SEE ALSO
Additional Information
Changes Affecting Compatibility
Some changes in 2.6 can affect compatibility and may require user actions. The 2.6 mongo shell provides a db.upgradeCheckAllDBs() method to perform a check for upgrade preparedness for some of these changes.
See Compatibility Changes in MongoDB 2.6 for a detailed list of compatibility changes.
Upgrade Process
See Upgrade MongoDB to 2.6 for full upgrade instructions.
Download
To download MongoDB 2.6, go to the downloads page.
Minor Releases
2.6.6 – December 09, 2014
- Fixed: Evaluating candidate query plans with concurrent writes on same collection may crash mongodSERVER-15580
- Fixed: 2.6 mongod crashes with segfault when added to a 2.8 replica set with 12 or more membersSERVER-16107
- Fixed: $regex, $in and $sort with index returns too many results SERVER-15696
- Change: moveChunk will fail if there is data on the target shard and a required index does not exist.SERVER-12472
- Primary should abort if encountered problems writing to the oplog SERVER-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 recovery SERVER-15111
- Explicitly zero .ns files on creation SERVER-15369
- Plan ranker will no longer favor intersection plans if predicate generates empty range index scanSERVER-14961
- Generate Community and Enterprise packages for SUSE 11 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 SERVER-14738
- Check the size of the split point before performing a manual split chunk operation 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 SERVER-9788
- Allow read from secondaries when both audit and authorization are enabled in a sharded clusterSERVER-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 SERVER-14302.
- Equality queries on _id with projection on _id may return orphan documents on sharded collectionsSERVER-14304.
- All issues closed in 2.6.3.
2.6.2 – June 16, 2014
- Query plans with differing performance can tie during plan ranking SERVER-13675.
- mongod may terminate if x.509 authentication certificate is invalid SERVER-13753.
- Temporary map/reduce collections are incorrectly replicated to secondaries SERVER-13981.
- mongos incorrectly targets multiple shards for nested field shard key predicates SERVER-14138.
- rs.stepDown() during mapReduce causes fassert when writing 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 options SERVER-13644.
- 2.6.1 Changelog.
- All issues closed in 2.6.1.
Minor Releases
2.6.6 – December 09, 2014
- Fixed: Evaluating candidate query plans with concurrent writes on same collection may crash mongodSERVER-15580
- Fixed: 2.6 mongod crashes with segfault when added to a 2.8 replica set with 12 or more membersSERVER-16107
- Fixed: $regex, $in and $sort with index returns too many results SERVER-15696
- Change: moveChunk will fail if there is data on the target shard and a required index does not exist.SERVER-12472
- Primary should abort if encountered problems writing to the oplog SERVER-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 recovery SERVER-15111
- Explicitly zero .ns files on creation SERVER-15369
- Plan ranker will no longer favor intersection plans if predicate generates empty range index scanSERVER-14961
- Generate Community and Enterprise packages for SUSE 11 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 SERVER-14738
- Check the size of the split point before performing a manual split chunk operation 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 SERVER-9788
- Allow read from secondaries when both audit and authorization are enabled in a sharded clusterSERVER-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 SERVER-14302.
- Equality queries on _id with projection on _id may return orphan documents on sharded collectionsSERVER-14304.
- All issues closed in 2.6.3.
2.6.2 – June 16, 2014
- Query plans with differing performance can tie during plan ranking SERVER-13675.
- mongod may terminate if x.509 authentication certificate is invalid SERVER-13753.
- Temporary map/reduce collections are incorrectly replicated to secondaries SERVER-13981.
- mongos incorrectly targets multiple shards for nested field shard key predicates SERVER-14138.
- rs.stepDown() during mapReduce causes fassert when writing 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 options SERVER-13644.
- 2.6.1 Changelog.
- All issues closed in 2.6.1.