In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
MongoDB 3.2 release Notes (Release Notes for MongoDB 3.2)
Original English text:
Https://docs.mongodb.org/master/release-notes/3.2/
December 8, 2015
MongoDB 3.2 is now released. The key features are the use of WiredTiger as the default storage engine, replication election enhancement, and config servers configuration in the cluster to replicate sets, readConcern, and document validation.
OpsManager 2.0 has also been released. Check the Ops Manager documentation and Ops Manager release notes for more information.
Small version release (Minor Releases)
3.2.1-January 12, 2016
Fixed bug: when a replication set performs a regular shutdown, a secondary replica member may mark a specific replicated but not yet applied operation as successfully applied: SERVER-21868
Using WiredTiger to improve insert load performance in the Windows version: SERVER-20262
Fixed a long-running transaction during block movement: SERVER-21366
All issues that were closed in version 3.2.1
WiredTiger as the default engine (WiredTiger as Default)
Since version 3.2, MongoDB has used WiredTiger as the default storage engine.
In order to specify the MMAPv1 storage engine, you must specify storage settings in any of the following ways:
Use the-- storageEngine option on the command line:
Mongod-storageEngine mmapv1
Or in the configuration file, use the storage.engine setting:
Storage: engine: mmapv1
Note:
For existing deployments, if you do not specify-- storageEngine or storage.engine settings, MongoDB 3.2 can automatically determine the storage engine used to create data files in-- dbpath or storage.dbPath.
If you specify-- storageEngine or storage.engine, mongod will not start if the dbPath contains a data file that is not created by the specified storage engine.
You can also refer to:
Default Storage Engine Change
Copy Election Enhancement (Replication Election Enhancements)
Starting with MongoDB 3.2, MongoDB reduces replication set failover time and accelerates monitoring of multiple co-existing primary members.
As part of the enhancement, MongoDB introduced the first version of the replication set protocol. The new replication set will use protocolVersion: 1 by default. Previous versions of MongoDB used version 0 of the protocol.
In addition, MongoDB uses the new replica set configuration option electionTimeoutMillis.
ElectionTimeoutMillis specifies a time limit in milliseconds to detect when the primary member of a replication set is unreachable.
ElectionTimeoutMillis applies only when using replication protocol version 1.
Sharding cluster enhancement (Sharded Cluster Enhancements)
MongoDB 3.2 abandons three mirrored mongod instances for the configuration server (config servers).
Instead, starting from 3. 2, the config servers of the sharding cluster can be deployed as a replication set. The replication set config servers must be running the WiredTiger storage engine.
This change improves the consistency of accessing config servers, because for sharded configuration data, MongoDB can take advantage of the standard replication set read-write protocol. In addition, this allows a sharding cluster to have more than 3 config servers because a replication set can have up to 50 members.
For more information, see Config Servers. To deploy a new sharding cluster using the replication set config servers, check out Deploy a Sharded Cluster.
ReadConcern
MongoDB 3.2 introduces the readConcern query option for replication sets and replication set fragmentation. The WiredTiger storage engine,readConcern option allows clients to select an isolation level for their read requests. You can specify a "majority" readConcern to read data that has been written to most nodes and cannot be rolled back. By default, MongoDB uses a "local" readConcern to return the currently available data to the node at the time of the query, even if the data has not been persisted to most nodes and may be rolled back. With MMAPv1 storage engine, you may only specify a readConcern of "local".
ReadConcern requires an update of the MongoDB driver for MongoDB version 3.2.
"majority" read confirmation (read concern) is supported only for replication sets that use protocol version 1. Replication sets running the version 0 protocol do not support "majority" read confirmation.
For more information about readConcern, including actions that support this option, check out Read Concern.
Partial index (Partial Indexes)
MongoDB 3.2provides options for creating indexes that index only documents that match the specified filter expression. By indexing a subset of documents in the collection, some indexes have lower storage requirements and lower performance consumption for index creation and maintenance. You can specify a partialFilterExpression option for all MongoDB index types.
The partialFilterExpression option accepts a document as the specified condition by using:
Equivalent expression (for example, field: value or using the $eq operator)
$exists: true expression
$gt,$gte,$lt,$lte expression
$type expression
The $and operator is only at the top level
For more information, check the Partial Indexes.
Document validation (Document Validation)
Since 3. 2, MongoDB provides the ability to validate documents during updates and inserts. Validation rules are specified on a per-collection basis.
To specify document validation on a new collection, use the new validator option in the db.createCollection () method. To add document validation to an existing collection, use the new validator option in the collMod command. For more information, see Document Validation.
To see the validation rules for a collection, use the db.getCollectionInfos () method.
The following command can use the new bypassDocumentValidation option to avoid verifying each operation:
ApplyOps command
FindAndModify command and db.collection.findAndModify () method
MapReduce command and db.collection.mapReduce () method
Insert command
Update command
$out for the aggregate command and db.collection.aggregate () method
For deployments that have access control enabled, you must have bypassDocumentValidation behavior. The built-in roles dbAdmin and restore provide this behavior.
Aggregation Framework Enhancement (Aggregation Framework Enhancements)
MongoDB introduces:
New phases, accumulators and expressions.
Availability of accumulator expressions is in the $project phase.
Performance improvements is in the sharding cluster.
A new stage of polymerization
Stage
Description
Grammar
$sample
Randomly select N clause file from input
{$sample: {size:}}
$indexStats
Returns statistics on index usage
{$indexStats: {}}
$lookup
Perform a left outer join association with another collection
{
$lookup:
{
From:
LocalField:
ForeignField:
As:
}
}
A new accumulator for the $group phase
Accumulator
Description
Grammar
$stdDevSamp
Cumulative standard deviation
{$stdDevSamp:}
$stdDevPop
Cumulative epidemic standard deviation
{$stdDevPop:}
New aggregate arithmetic operation
Operation
Description
Grammar
$sqrt
Calculate the square root
{$sqrt:}
$abs
Returns the absolute value of a number
{$abs:}
$log
Calculates the logarithm of a number at a specified cardinality
{$log: [,]}
$log10
Calculate the logarithm with a base of 10
{$log10:}
$ln
Calculate the natural logarithm of a number
{$ln:}
$pow
Calculate the power of a specified exponent of a number
{$pow: [,]}
$exp
Calculate the exponent as the power of e
{exp:}
$trunc
Truncated numbers are integers
{$trunc:}
$ceil
Returns the smallest integer greater than or equal to the specified number
{$ceil:}
$floor
Returns a small fish or the largest integer equal to the specified number
{floor:}
New aggregate array operation
Operation
Description
Grammar
$slice
Returns a subset of the array
{$slice: [,]}
Or
{$slice: [,]}
$arrayElemAt
Returns the element at the specified array index position
{$arrayElemAt: [,]}
$concatArrays
Join array
{
$concatArrays: [,...]
}
$isArray
Determine whether the Operand is an array
{$isArray: []}
$filter
Query a subset of condition-based arrays
{
$filter:
{
Input:
As:
Cond:
}
}
Accumulator expression availability (Accumulator Expression Availability)
Starting with version 3.2, the following accumulator expressions, previously available only in the $group phase, are now available in the $project phase:
$avg
$min
$max
$sum
$stdDevPop
$stdDevSamp
When used in the $project phase, these accumulator expressions are acceptable:
Single parameter:
Multiple parameters: [,.]
General enhancement (General Enhancements)
In MongoDB 3.2, the $project phase supports the use of square brackets [] to directly create new array columns. For example, view the Project New Array Fields.
MongoDB 3.2 introduces the minDistance option for the $geoNear phase.
The $unwind phase no longer reports errors on non-array operands. If the Operand is not resolved to an array but is not missing, it is null or an empty array. $unwind considers the Operand to be a single-element array.
The $unwind phase can:
Include the index of array elements in the output by specifying a new option includeArrayIndex in the phase rule.
Output documents with missing array columns, null, or an empty array by specifying a new option preserveNullAndEmptyArrays in the phase rule.
To support these new features, $unwind can now use a different syntax to view the details of $unwind.
Optimization (Optimization)
The index can override the aggregation operation.
MongoDB improves the overall performance of pipelines in large shard clusters.
If the pipe starts with the exact $match of the slice key, the entire pipe runs only on the matching shard. Previously, the pipe will be split and the merge operation will be performed on the main slice.
For aggregation operations running on multiple shards, if the operations do not need to run on the main shard of the database, these operations can route the results to any shard to merge the results, so as to avoid the overload of the main shard of the database. The aggregation operations that need to be run on the main shard of the database are the $out phase and the $lookup phase.
Compatibility (Compatibility)
For compatibility changes, check Aggregation Compatibility Changes.
MongoDB tool Enhancement (MongoDB Tools Enhancements)
Mongodump and mongorestore use the new-- archive option to add support for archive files and standard output / input streams. This enhancement allows for pipe-based data flows through network devices. For example, view
Mongodump to an Archive File and mongodump an Archive to Standard Output
Restore a Database from an Archive File and Restore a Database from Standard Input.
Mongodump and mongorestore use the new-- gzip option to add support for compressed data export. This enhancement reduces the storage space for exported files. For example, view:
Compress mongodump Output
Restore from Compressed Data .
Encrypted Storage engine (Encrypted Storage Engine)
Enterprise Edition features:
Available in MongoDB Enterprise Edition.
Important:
Available only for the WiredTiger storage engine.
Quiet encryption, when combined with transparent encryption and good security policies to protect relevant accounts, passwords, and encryption keys, can help ensure compliance with security and private standards, including HIPAA, PCI-DSS, and FERPA.
MongoDB Enterprise Edition 3.2 introduces a local encryption option for the WiredTiger storage engine. This feature allows MongoDB to encrypt data files so that only parties with a decryption key can decode and read the data. For more details, see Encrypted Storage Engine.
Text search enhancement (Text Search Enhancements)
Text Index version 3 (text Index Version 3)
MongoDB 3.2introduces version 3 of text index. The key features of the new version of the index are:
Improved case insensitivity.
Diacritic insensitivity .
Extra delimiters for tokenization.
Starting with MongoDB 3.2, version 3 is the default version for new text indexes.
You can also view:
Text Index Version 3 Compatibility
$text operator enhancement ($text Operator Enhancements)
The $text operator adds support for the following:
Case sensitive text search comes with a new $caseSensitive option, and
Diacritic sensitive text search comes with a new $diacriticSensitive option.
For more information and examples, check out the relevant sections of the $text operator, Case Insensitivity and Diacritic Insensitivity.
Other language support (Support for Additional Languages)
Enterprise Edition features:
Available only in MongoDB Enterprise Edition.
Starting with version 3.2, MongoDB Enterprise Edition provides support for the following languages: Arabic,Farsi (especially Dari and Iranian Persian dialects), Urdu, simplified Chinese and traditional Chinese.
For more information, see Text Search with Basis Technology Rosette Linguistics Platform.
New storage engine
InMemory storage engine
Enterprise Edition features:
Available only in MongoDB Enterprise Edition.
MongoDB Enterprise Edition 3.2 provides an in-memory storage engine. Except for some metadata, the in-memory storage engine does not maintain any disk data. The in-memory storage engine allows for more predictable database operation latency by avoiding disk Ihand O.
Warning:
Currently in the beta phase. Cannot be used in the product.
To select this storage engine, specify
InMemory for the-- storageEngine option or the storage.engine setting.
-- dbpath. Although the in-memory processing engine does not write data to the file system, it maintains dbpath small metadata files and diagnostic data as well as temporary files that build large indexes.
The inMemory storage engine uses document-level locks. For more details, check out In-Memory Storage Engine.
EphemeralForTest Storage engine (ephemeralForTest Storage Engine)
MongoDB 3.2provides a new storage engine for testing. Instead of some metadata, the storage engine used for testing does not maintain any disk data and does not need to be cleaned up during the test run. The storage engine used for testing is not supported.
Warning:
For test purposes only. Cannot be used in the product.
To select this storage engine, specify
EphemeralForTest for the-- storageEngine option or the storage.engine setting.
-- dbpath. Although the storage engine used for testing does not write data to the file system, it maintains small metadata files in-- dbpath.
The ephemeralForTest storage engine uses set-level locks.
General enhancement (General Enhancements)
Bit test query operator (Bit Test Query Operators)
MongoDB 3.2provides a new query operator to test bit values:
$bitsAllSet
$bitsAllClear
$bitsAnySet
$bitsAnyClear
SpiderMonkey JavaScript engine (SpiderMonkey JavaScript Engine)
MongoDB 3.2 uses SpiderMonkey as the JavaScript engine for mongo shell and mongod server.
SpiderMonkey provides support for other platforms and has an improved memory management model.
This change affects all JavaScript behaviors, including the command mapReduce,group, and the query operator $where;. However, the change should be completely transparent to the user.
You can also view:
SpiderMonkey Compatibility Changes
Mongo Shell and CRUD API (mongo Shell and CRUD API)
In order to provide consistency with MongoDB-driven CRUD (Create/Read/Update/Delete) API, mongo shell introduces other CRUD methods to be consistent with the driver's CRUD API:
New API
Description
Db.collection.bulkWrite ()
It is equivalent to initializing the Bulk () operation constructor, using the Bulk method to add the operation and running Bulk.execute () to perform the operation.
MongoDB 3.2abandons Bulk () and its related methods.
Db.collection.deleteMany ()
Equivalent to db.collection.remove ().
Db.collection.deleteOne ()
Equivalent to db.collection.remove () with justOne set to true; for example:
Db.collection.remove (, true) or db.collection.remove (, {justOne: true}).
Db.collection.findOneAndDelete ()
Equivalent to the db.collection.findAndModify () method with remove set to true.
Db.collection.findOneAndReplace ()
Equivalent to the db.collection.findAndModify () method with update set as an alternative document.
Db.collection.findOneAndUpdate ()
Equivalent to the db.collection.findAndzModify () method with the update set to a document that uses the update operator to specify modifications.
Db.collection.insertMany ()
Equivalent to the db.collection.insert () method that takes an array of documents as a parameter.
Db.collection.insertOne ()
Equivalent to the db.collection.insert () method that takes a document as a parameter.
Db.collection.replaceOne ()
Equivalent to the db.collection.update (,) method with a replacement document as a parameter.
Db.collection.updateMany ()
Equivalent to the db.collection.update (, {multi: true,...}) method with the specified modified document set to true using the update operator and the multi option.
Db.collection.updateOne ()
Equivalent to a document with a modification specified by the db.collection.update (,) method using the update operator.
WiredTiger and fsyncLock (WiredTiger and fsyncLock)
Starting with MongoDB 3.2, the WiredTiger storage engine supports the fsync command with the lock option or the mongo shell method db.fsyncLock (). That is, for the WiredTiger storage engine, these operations ensure that the data files remain unchanged and that backup consistency is created.
Discard 32-bit binaries (Deprecation of 32-bit Binaries)
Starting with version 3.2, 32-bit binaries are discarded and are not available in future releases.
The $type operator accepts string aliases ($type Operator Accepts String Aliases)
The $type operator accepts string aliases for BSON types, except for numbers associated with the BSON type.
Explain () supports distinct () operation (explain () Support for distinct () Operation)
Db.collection.explain () adds support for the db.collection.distinct () method. For more information, see db.collection.explain ().
Abandon the HTTP interface (Deprecation of the HTTP Interface)
Since version 3.2, MongoDB has abandoned its HTTP interface.
Geospatial optimization (Geospatial Optimization)
MongoDB 3.2introduces 2dsphere indexes version 3, which indexes GeoJSON geometries at a finer level. The new version improves the performance of 2dsphere index queries in smaller areas. In addition, the performance of 2d indexes and 2dsphere indexes,geoNear queries has been improved for dense datasets.
You can also view:
2dsphere Index Version 3 Compatibility
Diagnostic data capture (Diagnostic Data Capture)
To enable MongoDB engineers to facilitate the analysis of MongoDB server behavior, MongoDB 3.2 introduces a diagnostic data collection architecture that writes server statistics to diagnostic files at regular intervals. By default, the schema captures data at an interval of 1 second. To modify the interval, look at the diagnosticDataCollectionPeriodMillis.
MongoDB creates a diagnostic.data directory under the mongod instance-- dbpath or storage.dbPath. Diagnostic data is stored as a file in the directory.
The maximum size of the diagnostic file is configured using diagnosticDataCollectionFileSizeMB, and the maximum size of the diagnostic.data directory is configured with diagnosticDataCollectionDirectorySizeMB.
The default value and maximum size for the capture interval are provided to MongoDB engineers as useful data with minimal impact on performance and storage size. Typically, these values only need to be modified at the request of the MongoDB engineer for specific diagnostic purposes.
Write confirmation (Write Concern)
Using protocolVersion: 1 for replication sets, secondary replica members confirm write operations after writing to their respective disk journals, ignoring the j option.
Using protocolVersdion: 1 true w: "majority" for replication sets means j: true.
Using j: true,MongoDB will only return after the requested number of members, including the primary member, has been written to the journal. Previously, the write confirmation of j: true in the replication set only required the master member to write to the journal, ignoring the w: write confirmation.
JournalCommitInterval (journalCommitInterval for WiredTiger) of WiredTiger engine
MongoDB 3.2 added support for the WiredTiger storage engine to specify the journal commit interval. View the journalCommitInterval options. In previous versions, the option applied only to the MMAPv1 storage engine.
For the related profile settings, MongoDB 3. 2 added the storage.journal.commitIntervalMs setting and discarded storage.mmapv1.journal.commitIntervalMs. Discarded storage.mmapv1.journal.commitIntervalMs settings as aliases for storage.journal.commitIntervalMs settings.
Changes that affect compatibility (Changes Affecting Compatibility)
Some MongoDB 3.2 changes may affect compatibility and may require user action. For a detailed list of compatibility changes, see Compatibility Changes in MongoDB 3.2.
Upgrade process (Upgrade Process)
See Upgrade MongoDB to 3.2 for a complete upgrade guide.
Known issues in 3.2.1 (Known Issues in 3.2.1)
List of known issues in version 3.2.1:
When the clock drift between nodes is greater than electionTimeOut, the client may find that the new primary node fails: SERVER-21744.
The fromMigrate tag is not set in oplog for deletion: SERVER-21678
In a version 3.2 mongo shell connected to a version 3.0 mongos or in a version 3.0 mongo shell connected to a version 3.0 mongos with read preference running explain, shards with version 3.2 are incompatible: SERVER-21661
The result of the connPoolStats command is no longer correct: SERVER-21597
ApplyOps backend index creation may deadlock: SERVER-21583
Performance regression written with w:majority for replication sets of protocolVersion 1: SERVER-21581
Performance regression of UNICODE-aware text processing Logic (text Index 3rd Edition): SERVER-19936
Known issues in 3.2.0 (Known Issues in 3.2.0)
List of known issues in version 3.2.0:
FindAndModify operations are not captured by profiler: SERVER-21772
The getMore command does not set the "nreturned" operation counter: SERVER-21750
When the clock drift between nodes is greater than electionTimeout, the client may find that the new primary node fails: SERVER-21744
The fromMigrate tag is not set in oplog for deletion: SERVER-21678
In a version 3.2 mongo shell connected to a version 3.0 mongos or in a version 3.0 mongo shell connected to a version 3.0 mongos with read preference running explain, shards with version 3.2 are incompatible: SERVER-21661
The result of the connPoolStats command is no longer correct: SERVER-21597
ApplyOps backend index creation may deadlock: SERVER-21583
Performance regression written with w:majority for replication sets of protocolVersion 1: SERVER-21581
Performance regression of UNICODE-aware text processing Logic (text Index 3rd Edition): SERVER-19936
Server performance regression in the plug-in workload of WiredTiger engine under Windows: SERVER-21792
Download (Download)
Download MongoDB 3.2and go to downloads page.
You can also view:
All Third Party License Notices.
All JIRA issues resolved in 3.2.
Other Resources (Additional Resources)
Get ready for MongoDB 3.2?Get our help.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.