On this page本页内容
March 3, 2015
MongoDB 3.0 is now available. Key features include support for the WiredTiger storage engine, pluggable storage engine API, SCRAM-SHA-1 authentication mechanism, and improved explain functionality.
MongoDB Ops Manager, which includes Automation, Backup, and Monitoring, is now also available. See the Ops Manager documentation and the Ops Manager release notes for more information.
Issues fixed:
Issues fixed:
Issues fixed:
Issues fixed:
Issues fixed:
Issues fixed:
secondaryPreferred can end up using unversioned connections: SERVER-18671lsn file)
may be ahead of what is synced to the data files:
SERVER-22261.Issues fixed:
listDatabases to be slow under WiredTiger. SERVER-20961Issues fixed:
findAndModify on mongos can upsert to the wrong shard. SERVER-20407.Issues fixed:
Issues fixed:
$sort on sharded systems SERVER-19464.Issues fixed and improvements:
$text and $near queries SERVER-18926.Issues fixed:
upsert=true with the Wired Tiger Storage engine: SERVER-18213Issues fixed:
db.eval() and add warnings:
SERVER-17453mapReduce in eval environment: SERVER-17889Issues fixed:
2d $nearSphere:
SERVER-17469mongod during repair operations with WiredTiger:
SERVER-17652 and SERVER-17729zlib block compression: SERVER-17713Issues fixed:
_id entries: SERVER-17487.MongoDB 3.0 introduces a pluggable storage engine API that allows third parties to develop storage engines for MongoDB.
MongoDB 3.0 introduces support for the WiredTiger storage engine. With the support for WiredTiger, MongoDB now supports two storage engines:
WiredTiger is an alternate to the default MMAPv1 storage engine. WiredTiger supports all MongoDB features, including operations that report on server, database, and collection statistics. Switching to WiredTiger, however, requires a change to the on-disk storage format. For instructions on changing the storage engine to WiredTiger, see the appropriate sections in the Upgrade MongoDB to 3.0 documentation.
MongoDB 3.0 replica sets and sharded clusters can have members with different storage engines; however, performance can vary according to workload. For details, see the appropriate sections in the Upgrade MongoDB to 3.0 documentation.
The WiredTiger storage engine requires the latest official MongoDB drivers. For more information, see WiredTiger and Driver Version Compatibility.
See also参阅
Support for touch Command, WiredTiger Storage Engine documentation
To configure the behavior and properties of the WiredTiger storage engine, see storage.wiredTiger configuration options. You can set WiredTiger options on the command line.
See also参阅
The 3.0 WiredTiger storage engine provides document-level locking and compression.
By default, WiredTiger compresses collection data using the snappy compression library. WiredTiger uses prefix compression on all indexes by default.
See also参阅
WiredTiger section in the Production Notes, the blog post New Compression Options in MongoDB 3.0
In version 3.0, the MMAPv1 storage engine adds support for collection-level locking.
To support multiple storage engines, some configuration settings for MMAPv1 have changed. See Configuration File Options Changes.
MongoDB 3.0 no longer implements dynamic record allocation and deprecates paddingFactor. The default allocation strategy for collections in instances that use MMAPv1 is power of 2 allocation, which has been improved to better handle large document sizes. In 3.0, the usePowerOf2Sizes flag is ignored, so the power of 2 strategy is used for all collections that do not have noPadding flag set.
For collections with workloads that consist only of inserts or in-place updates (such as incrementing counters), you can disable the power of 2 strategy. To disable the power of 2 strategy for a collection, use the collMod command with the noPadding flag or the db.createCollection() method with the noPadding option.
Warning
Do not set noPadding if the workload includes removes or any updates that may cause documents to grow. For more information, see No Padding Allocation Strategy.
When low on disk space, MongoDB 3.0 no longer errors on all writes but only when the required disk allocation fails. As such, MongoDB now allows in-place updates and removes when low on disk space.
See also参阅
In MongoDB 3.0, replica sets can have up to 50 members. [1] The following drivers support the larger replica sets:
The C, C++, Perl, and legacy PHP drivers, as well as the earlier versions of the Ruby, Python, and Node.JS drivers, discover and monitor replica set members serially, and thus are not suitable for use with large replica sets.
| [1] | The maximum number of voting members remains at 7. |
The process that a primary member of a replica set uses to step down has the following changes:
replSetStepDown will attempt to terminate long running user operations that would block the primary from stepping down, such as an index build, a write operation or a map-reduce job.replSetStepDown will wait for an electable secondary to catch up to the state of the primary before stepping down. Previously, a primary would wait for a secondary to catch up to within 10 seconds of the primary (i.e. a secondary with a replication lag of 10 seconds or less) before stepping down.replSetStepDown now allows users to specify a secondaryCatchUpPeriodSecs parameter to specify how long the primary should wait for a secondary to catch up before stepping down._id indexes.See also参阅
MongoDB 3.0 provides the following enhancements to sharded clusters:
sh.removeTagRange() helper to improve management of sharded collections with tags. The new sh.removeTagRange() method acts as a complement to sh.addTagRange().mongos instances no longer pin connections to members of replica sets when performing read operations. Instead, mongos reevaluates read preferences for every operation to provide a more predictable read preference behavior when read preferences change.writeConcern setting to configure the write concern of chunk migration operations. You can configure the writeConcern setting for the balancer as well as for moveChunk and cleanupOrphaned commands.sh.status() includes information about the state of the balancer. See sh.status() for details.See also参阅
Sharded Cluster Setting in Compatibility Changes in MongoDB 3.0
MongoDB 3.0 includes the following security enhancements:
SCRAM-SHA-1 requires a driver upgrade if your current driver version does not support SCRAM-SHA-1. For the driver versions that support SCRAM-SHA-1, see Requirements.See also参阅
MongoDB 3.0 includes a new query introspection system that provides an improved output format and a finer-grained introspection into both query plan and query execution.
For details, see the new db.collection.explain() method and the new explain command as well as the updated cursor.explain() method.
For information on the format of the new output, see Explain Results.
To improve usability of the log messages for diagnosis, MongoDB categorizes some log messages under specific components, or operations, and provides the ability to set the verbosity level for these components. For information, see Log Messages.
All MongoDB tools except for mongosniff and mongoperf are now written in Go and maintained as a separate project.
mongodump and mongorestore. You can control the number of collections that mongorestore will restore at a time with the --numParallelCollections option.-excludeCollection and --excludeCollectionsWithPrefix for mongodump to exclude collections.mongorestore can now accept BSON data input from standard input in addition to reading BSON data from file.mongostat and mongotop can now return output in JSON format with the --json option.mongoimport, mongorestore, and mongofiles. Use the --writeConcern option. The default writeConcern has been changed to ‘w:majority’.mongofiles now allows you to configure the GridFS prefix with the --prefix option so that you can use custom namespaces and store multiple GridFS namespaces in a single database.See also参阅
dropDatabase, drop, dropIndexes operations occur for the database or collection affected by the index builds. The dropDatabase, drop, and dropIndexes commands will still fail with the error message a background operation is currently running, as in 2.6.createIndexes command,mongos if the index includes the shard key.See also参阅
MongoDB 3.0 includes the following query enhancements:
$geoIntersects and $geoWithin queries. “Big”
polygons are single-ringed GeoJSON polygons with areas greater than that of a single hemisphere. See $geometry, $geoIntersects, and $geoWithin for details.aggregate(), adds a new $dateToString operator to facilitate converting a date to a formatted string.$eq query operator to query for equality conditions.See also参阅
Most non-Enterprise MongoDB distributions now include support for TLS/SSL. Previously, only MongoDB Enterprise distributions came with TLS/SSL support included; for non-Enterprise distributions, you had to build MongoDB locally with the --ssl flag (i.e. scons --ssl).
32-bit MongoDB builds are available for testing, but are not for production use. 32-bit MongoDB builds do not include the WiredTiger storage engine.
MongoDB builds for Solaris do not support the WiredTiger storage engine.
MongoDB builds are available for Windows Server 2003 and Windows Vista (as “64-bit Legacy”), but the minimum officially supported Windows version is Windows Server 2008.
See also参阅
Non-Enterprise MongoDB Linux packages for 3.0 and later are in a new repository. Follow the appropriate Linux installation instructions to install the 3.0 packages from the new location.
Auditing in MongoDB Enterprise can filter on any field in the audit message, including the fields returned in the param document. This enhancement, along with the auditAuthorizationSuccess parameter, enables auditing to filter on CRUD operations. However, enabling auditAuthorizationSuccess to audit of all authorization successes degrades performance more than auditing only the authorization failures.
Some changes in 3.0 can affect compatibility and may require user actions. For a detailed list of compatibility changes, see Compatibility Changes in MongoDB 3.0.
See Upgrade MongoDB to 3.0 for full upgrade instructions.
To download MongoDB 3.0, go to the downloads page.