Release Notes for MongoDB 6.0 (Stable Release)MongoDB 6.0发布说明(稳定版)
On this page
Patch Releases修补程序发布Aggregation聚合Change Streams更改流Cluster Administration群集管理Clustered Collections群集集合Indexes索引Installation安装Replica Sets复制集Security安全Sharding分片Slot-Based Query Execution Engine基于插槽的查询执行引擎Stable API稳定APITime Series Collections时间序列集合General Improvements一般改进Changes Affecting Compatibility影响兼容性的更改Upgrade Procedures升级过程Downgrade Consideration降级考虑Download下载Known Issues已知问题Report an Issue报告问题
This page describes changes and new features introduced in MongoDB 6.0.本页介绍MongoDB 6.0中引入的更改和新功能。
MongoDB 6.0 is a Major Release, which means that it is supported for both MongoDB Atlas and on-premises deployments. MongoDB 6.0是一个主要版本,这意味着它同时支持MongoDB Atlas和本地部署。MongoDB 6.0 includes changes introduced in MongoDB Rapid Releases 5.1, 5.2, and 5.3. MongoDB 6.0包括在MongoDB Rapid Release 5.1、5.2和5.3中引入的更改。This page describes changes introduced in those Rapid Releases and MongoDB 6.0.本页介绍了Rapid Release和MongoDB 6.0中引入的更改。
To learn more about the differences between Major and Rapid releases, see MongoDB Versioning.要了解更多关于Major和Rapid版本之间的差异,请参阅MongoDB版本控制。
Past Release Limitations过去的发布限制
Some past releases have critical issues. 过去的一些版本存在关键问题。These releases are not recommended for production use. 不建议将这些版本用于生产用途。Use the latest available patch release version instead.请改用最新的可用修补程序版本。
SERVER-68511 | 6.0.0 |
WT-10461 | 6.0.0 - 6.0.4 (ARM64 or POWER system architectures) |
Patch Releases修补程序发布
6.0.8 - Jul 13, 2023
-
SERVER-61127
Multi-writes may exhaust the number of retry attempts in the presence of ongoing chunk migrations在存在正在进行的块迁移的情况下,多次写入可能会耗尽重试次数 -
SERVER-77005
Leave LDAP users logged-in during LDAP downtime在LDAP停机期间让LDAP用户保持登录状态 -
SERVER-78126
For specific kinds of input, mongo::Value() always hashes to the same result on big-endian platforms对于特定类型的输入,mongo::Value()在big-endian平台上总是散列到相同的结果
6.0.7 - Jun 28, 2023
-
SERVER-71985
Automatically retry time series insert on DuplicateKey errorDuplicateKey错误时自动重试时间序列插入 -
SERVER-73007
CURL_OPT_SEEKFUNCTION not set for multi-pass authentication未为多次身份验证设置CURL_OPT_SEEKFUNCTION -
SERVER-74551
WriteConflictException unnecessarily logged as warning during findAndModify after upgrade to mongo 5.0升级到mongo 5.0后,在findAndModify
期间不必要地将WriteConflictException
记录为警告 -
SERVER-77018
Deadlock between dbStats and 2 index buildsdbStats和2个索引生成之间的死锁 -
WT-10449
Do not save update chain when there are no updates to be written to the history store当没有要写入历史存储的更新时,不保存更新链 -
WT-11031
Fix RTS to skip tables with no time window information in the checkpoint修复RTS跳过检查点中没有时间窗口信息的表的问题
6.0.6 - May 12, 2023
-
SERVER-51835
Mongos readPreferenceTags are not working as expectedMongosreadPreferenceTags
未按预期工作 -
SERVER-67105
$in queries do not use clustered index$in
查询不使用聚集索引 -
SERVER-72774
A node in quiesce mode can win election处于静止模式的节点可以赢得选举 -
SERVER-74930
$avg is returning the sum instead of the average in aggregate $group$avg
返回的是合计$group
中的总和,而不是平均值 -
SERVER-75205
Deadlock between stepdown and restoring locks after yielding when all read tickets exhausted当所有读取的票证都用完时,退位和退位后恢复锁定之间的死锁
6.0.5 - Mar 13, 2023
Issues Fixed:
-
SERVER-61909
Hang inserting or deleting document with large number of index entries挂起插入或删除包含大量索引项的文档 -
SERVER-66469
Filtering timeseries with date-field does not include results from before 1970筛选具有日期字段的时间序列不包括1970年以前的结果 -
SERVER-68122
Investigate replicating the collection WiredTiger config string during initial sync调查在初始同步期间复制集合WiredTiger配置字符串 -
SERVER-70395
Slot-Based Engine too aggressively uses disk for $group and is slow基于插槽的引擎过于激进地使用$group
的磁盘,并且速度缓慢 -
SERVER-73232
Change the default log-verbosity for更改_killOperations
_killOperations
的默认日志详细信息
6.0.4 - Jan 26, 2023
Issues Fixed:
-
SERVER-72416
The find and findAndModify projection code does not honor the collection level collationfind
和findAndModify
投影代码不支持集合级别的排序规则 -
SERVER-71759
dataSize
command doesn't yield命令不让步 -
SERVER-70237
Chunks merge commit must not create a BSON object too large区块合并提交不能创建过大的BSON对象 -
SERVER-72222
mapReduce
with single reduce optimization fails when merging results in sharded cluster当合并结果在分片集群中时,单个reduce优化失败 -
WT-9268
Delay deletion of the history store record to reconciliation将历史存储记录的删除延迟到对账
6.0.3 - Nov 21, 2022
Issues fixed:
-
SERVER-66289
$out incorrectly throws BSONObj size error on v5.0.8$out
在v5.0.8上错误地抛出BSONObj大小错误 -
SERVER-68139
Resharding command fails if the projection sort is bigger than 100MB如果投影排序大于100MB,则重定向命令失败 -
SERVER-68371
Enabling CSFLE in your MongoClient causes Atlas Search to fail在MongoClient中启用CSFLE会导致Atlas Search失败 -
SERVER-68115
Bug fix for "elemMatchRootLength > 0" invariant trigger修复了“elemMatchRootLength>0”不变触发器的错误 -
SERVER-68394
Ensure we do not yield strong locks upon startup recovery when _id index is missing当_id
索引丢失时,确保在启动恢复时不会产生强锁
6.0.2 - Sep 28, 2022
Issues fixed:
-
SERVER-68925
Reintroduce check table logging settings at startup在启动时重新引入检查表日志记录设置 (revert SERVER-43664) -
SERVER-68628
Retrying a failed resharding operation after a primary failover can lead to server crash or lost writes在主故障转移后重试失败的重新处理操作可能会导致服务器崩溃或写入丢失 -
SERVER-63852
getThreadName() should not crashgetThreadName()
不应崩溃 -
SERVER-65317
mongod removes connection from connection pool after running simple $search querymongod
在运行简单的$search
查询后从连接池中删除连接 -
SERVER-63843
Don't allow recursive doLog in synchronous signal handlers不允许在同步信号处理程序中使用递归doLog -
WT-9870
Fix updating pinned timestamp whenever oldest timestamp is updated during recovery修复在恢复期间每当更新最旧的时间戳时更新固定的时间戳的问题
6.0.1 - Aug 19, 2022
Issues fixed:
-
SERVER-68511
MovePrimary update ofconfig.databases
entry must use dotted fields notationconfig.databases
项的MovePrimary更新必须使用点域表示法 -
SERVER-68062
Multi-stage aggregations that use $geoNear may violate constraints使用$geoNear
的多阶段聚合可能违反约束 -
SERVER-66072
$match sampling and $group aggregation strange behavior$match
采样和$group
聚合的奇怪行为 -
SERVER-68130
AutoSplitVector could generate response bigger than BSONObjMaxUserSizeAutoSplitVector
可能生成大于BSONObjMaxUserSize
的响应 -
SERVER-68209
Remove uassert that prevents删除防止config.image_collection
entry from being invalidatedconfig.image_collection
项无效的uassert
6.0.0 - Jul 19, 2022
The rest of this page describes changes and new features introduced in MongoDB 6.0.本页的其余部分介绍了MongoDB 6.0中引入的更改和新功能。
Aggregation聚合
New Aggregation Stages新建聚合阶段
MongoDB 6.0 introduces the following aggregation stages:MongoDB 6.0引入了以下聚合阶段:
$densify | |
$documents | |
$fill | null and missing field values within documents.null 字段值和缺少的字段值。
|
$shardedDataDistribution |
New Aggregation Operators新聚合运算符
MongoDB 6.0 introduces the following aggregation operators:MongoDB 6.0引入了以下聚合运算符:
$bottom | |
$bottomN | n elements within a group, according to the specified sort order.n 个元素的聚合。 |
$firstN | n elements within a group. n 个元素的聚合。$firstN array operator.$firstN 数组运算符不同。 |
$firstN (array operator) | $firstN accumulator.$firstN 累加器不同。 |
$lastN | n elements within a group. n 个元素的聚合。$lastN array operator.$lastN 数组运算符不同。 |
$lastN (array operator) | $lastN accumulator.$lastN 累加器不同。 |
$linearFill | null and missing fields in a window using linear interpolation based on surrounding field values.null 字段和缺失字段。
|
$locf | null and missing fields in a window to the last non-null value for the field.null 和缺失字段的值设置为该字段的最后一个非null 值。
|
$maxN | n maximum valued elements within a group. Distinct from the $maxN array operator.n 个最大值元素的聚合。与$maxN 数组运算符不同。 |
$maxN (array operator) | n largest values in an array. Distinct from the $maxN accumulator.n 个值。与$maxN 累加器不同。 |
$minN | n minimum valued elements within a group. $minN array operator.$minN 数组运算符不同。 |
$minN (array operator) | n smallest values in an array. n 个最小值。$minN accumulator.$minN 累加器不同。 |
$sortArray | |
$top | top .top 不同。 |
$topN | n elements within a group, according to the specified sort order.n 个元素的聚合。 |
$tsIncrement | long .long 形式返回时间戳中的递增序号。
|
$tsSecond | long .long 返回。
|
$lookup
and $graphLookup
with Sharded Collections带有分片集合的$lookup
和$graphLookup
$lookup
and $graphLookup
with Sharded CollectionsStarting in MongoDB 5.1, the 从MongoDB 5.1开始,$lookup
and $graphLookup
aggregation stages support sharded collections in the from
parameter.$lookup
和$graphLookup
聚合阶段支持from参数中的分片集合。
In previous versions of MongoDB, 在MongoDB的早期版本中,$lookup
and $graphLookup
only allowed for unsharded from
collections.$lookup
和$graphLookup
只允许从集合取消排序。
Change Streams更改流
Optimized Change Streams优化的变更流
Starting in MongoDB 5.1, change streams are optimized, providing more efficient resource utilization and faster execution of some aggregation pipeline stages.从MongoDB 5.1开始,更改流得到了优化,提供了更高效的资源利用率和更快的一些聚合管道阶段的执行。
wallTime
Change Stream Output Field更改流输出字段
Starting in MongoDB 6.0, the change stream output has a new 从MongoDB 6.0开始,变更流输出有一个新的wallTime
field that contains the server date and time of the database operation.wallTime
字段,其中包含数据库操作的服务器日期和时间。
Change Streams with Document Pre- and Post-Images使用文档前后图像更改流
Starting in MongoDB 6.0, you can use change streams to output the version of a document before and after changes (the document pre- and post-images). 从MongoDB 6.0开始,您可以使用更改流来输出更改前后的文档版本(文档前和后图像)。For examples, see Change Streams with Document Pre- and Post-Images.例如,请参阅使用文档前图像和后图像更改流。
Change Stream Expanded Events更改流扩展事件
Starting in MongoDB 6.0, change streams can show additional change events for DDL operations, like creating indexes and dropping collections.从MongoDB 6.0开始,更改流可以显示DDL操作的其他更改事件,如创建索引和删除集合。
For more information, see Expanded Events.有关详细信息,请参阅扩展的事件。
Cluster Administration群集管理
Cluster Server Parameters群集服务器参数
Starting in MongoDB 6.0, you can use MongoDB Cluster Parameters to modify and retrieve configuration options for all nodes in a replica set or sharded cluster. 从MongoDB 6.0开始,您可以使用MongoDB Cluster Parameters来修改和检索副本集或分片集群中所有节点的配置选项。You can use 可以使用setClusterParameter
to modify cluster-wide options and getClusterParameter
to retrieve the value of a cluster parameter.setClusterParameter
修改集群范围的选项,使用getClusterParameter
检索集群参数的值。
Connection Pool Parameters连接池参数
Starting in MongoDB 6.0, you can use 从MongoDB 6.0开始,您可以使用ShardingTaskExecutorPoolMinSizeForConfigServers
and ShardingTaskExecutorPoolMaxSizeForConfigServers
to set the minimum and maximum sharding TaskExecutor connection pool size for configuration servers.ShardingTaskExecutorPoolMinSizeForConfigServers
和ShardingTaskExecutorPoolMaxSizeForConfigServers
来设置配置服务器的最小和最大分片TaskExecutior连接池大小。
changeStreamOptions
Cluster Parameter群集参数
Starting in MongoDB 6.0, you can use 从MongoDB 6.0开始,您可以使用changeStreamOptions
to control the retention policy of change stream pre- and post-images.changeStreamOptions
来控制更改流前映像和后映像的保留策略。
internalSessionsReapThreshold
Parameter参数
Starting in MongoDB 6.0, you can use the new 从MongoDB 6.0开始,您可以使用新的internalSessionsReapThreshold
parameter to set the session limit for internal session metadata deletion.internalSessionsReapThreshold
参数来设置内部会话元数据删除的会话限制。
Multiple Arbiters Unsupported不支持多个仲裁器
Starting in MongoDB 5.3, support for multiple arbiters in a replica set is disabled by default. 从MongoDB 5.3开始,默认情况下会禁用对副本集中多个仲裁器的支持。To enable support for multiple arbiters, start each node with the 要启用对多个仲裁器的支持,请使用allowMultipleArbiters
parameter.allowMultipleArbiters
参数启动每个节点。
Clustered Collections群集集合
Starting in MongoDB 5.3, you can create a collection with a clustered index. 从MongoDB 5.3开始,您可以创建一个具有聚集索引的集合。Collections created with a clustered index are called clustered collections.使用聚集索引创建的集合称为聚集集合。
To learn about the benefits compared to a normal collection, see Clustered Collections.要了解与普通集合相比的优势,请参阅群集集合。
Indexes索引
Starting in MongoDB 5.1, you can use the 从MongoDB 5.1开始,您可以使用collMod
database command to add the expireAfterSeconds
option to an existing single-field non-TTL index.collMod
数据库命令将expireAfterSeconds
选项添加到现有的单字段非TTL索引中。
Starting in MongoDB 6.0, you can use the 从MongoDB 6.0开始,您可以使用prepareUnique
and unique
options for the collMod
command to convert an existing standard index to a unique index.prepareUnique
和collMod
命令的unique
选项将现有的标准索引转换为唯一索引。
Partial Indexes部分索引
Starting in MongoDB 6.0, you can use the operators 从MongoDB 6.0开始,您可以使用运算符$in
and $or
to create partial indexes. $in
和$or
来创建部分索引。The partialFilterExpression
maximum depth is also expanded from 2 to 4. partialFilterExpression
的最大深度也从2扩展到4。You can now use the operators 您现在可以在非顶层使用运算符$and
and $or
at non-top-levels.$and
和$or
。
Installation安装
SELinux PoliciesSELinux策略
Starting in MongoDB 5.1, there is a new SE Linux Policy for:从MongoDB 5.1开始,有一个新的SE Linux策略用于:
-
MongoDB Enterprise ServerMongoDB企业服务器 -
MongoDB Community Edition ServerMongoDB社区版服务器
running on Red Hat Linux. The SELinux policy is for use with default installations using 在Red Hat Linux上运行。SELinux策略用于使用rpm安装程序包的默认安装。rpm
installer packages.
Replica Sets复制集
Multiple Arbiters Unsupported不支持多个仲裁器
Starting in MongoDB 5.3, support for multiple arbiters in a replica set is disabled by default. 从MongoDB 5.3开始,默认情况下会禁用对副本集中多个仲裁器的支持。To enable support for multiple arbiters, start each node with the 要启用对多个仲裁器的支持,请使用allowMultipleArbiters
parameter.allowMultipleArbiters
参数启动每个节点。
initialSyncMethod
Parameter
Starting in MongoDB 5.2, the 从MongoDB 5.2开始,initialSyncMethod
determines whether initial sync is a logical initial sync or a file copy based initial sync.initialSyncMethod
确定初始同步是逻辑初始同步还是基于文件副本的初始同步。
initialSyncMethod
is only available in MongoDB Enterprise Server.仅在MongoDB Enterprise Server中可用。
Specify Secondary Oplog Batch Delay指定辅助操作日志批处理延迟
Starting in MongoDB 6.0, you can use the 从MongoDB 6.0开始,您可以使用oplogBatchDelayMillis
server parameter to specify a delay for writes of oplog batches on secondaries. oplogBatchDelayMillis
服务器参数来指定在辅助设备上写入oplog批的延迟。Adding a short oplog batch delay can reduce IOPS on secondaries, but adds latency for writes with write concern 添加较短的oplog批处理延迟可以降低辅助设备的IOPS,但会增加"majority"
."majority"
写入问题的写入延迟。
For more information, see 有关更多信息,请参阅oplogBatchDelayMillis
.oplogBatchDelayMillis
。
Security安全
Audit Log Encryption审核日志加密
Starting in MongoDB 6.0 Enterprise, you can encrypt the MongoDB audit log.从MongoDB 6.0 Enterprise开始,您可以对MongoDB审计日志进行加密。
To configure the audit log, see Audit Log.要配置审核日志,请参阅审核日志。
Sharding分片
Default Chunk Size Increased from 64 MB to 128 MB默认区块大小从64 MB增加到128 MB
Starting in MongoDB 5.2, the default chunk size is 128 megabytes. 从MongoDB 5.2开始,默认的区块大小是128兆字节。In earlier versions of MongoDB, the default chunk size is 64 megabytes.在早期版本的MongoDB中,默认块大小为64兆字节。
enableSharding
No Longer Required不再需要
Starting in MongoDB 6.0, the 从MongoDB 6.0开始,不再需要enableSharding
command is no longer required to shard a collection.enableSharding
命令来分片集合。
Monitor Defragmentation Status监视分片整理状态
Starting in MongoDB 5.3, the 从MongoDB 5.3开始,balancerCollectionStatus
command returns detailed information when run on a namespace going through chunk defragmentation. balancerCollectionStatus
命令在进行区块分片整理的命名空间上运行时返回详细信息。The output includes the current phase of the defragmentation and how many chunks are left to process.输出包括分片整理的当前阶段以及还有多少块需要处理。
To see example output, see Ongoing Defragmentation Process.要查看示例输出,请参阅正在进行的分片整理过程。
Slot-Based Query Execution Engine基于插槽的查询执行引擎
Starting in MongoDB 5.1, MongoDB uses a new query execution engine for eligible queries, called the slot-based query execution engine. 从MongoDB 5.1开始,MongoDB为符合条件的查询使用了一个新的查询执行引擎,称为基于槽的查询执行发动机。If the slot-based query execution engine is used, new fields are included in the query explain plan output.如果使用基于槽的查询执行引擎,则新字段将包含在查询解释计划输出中。
-
The new query execution engine is used if possible.如果可能的话,将使用新的查询执行引擎。 -
If the new query execution engine is used, new fields are included in the query explain plan output.如果使用新的查询执行引擎,则新字段将包含在查询解释计划输出中。
Slot-Based Query Execution Engine Can Execute $group
and $lookup
Stages基于插槽的查询执行引擎可以执行$group
和$lookup
阶段
$group
and $lookup
StagesStarting in version 6.0, MongoDB uses the slot-based query execution engine to execute eligible 从6.0版本开始,MongoDB使用基于槽的查询执行引擎,在满足某些条件时执行符合条件的$group
and $lookup
stages when certain conditions are met.$group
和$lookup
阶段。
For more information, see Slot-Based Query Execution Engine Pipeline Optimizations.有关更多信息,请参阅基于槽的查询执行引擎管道优化。
Set Slot-Based Query Execution Engine Plan Cache Size设置基于插槽的查询执行引擎计划缓存大小
You can set the size of the plan cache for the new query engine with the 您可以使用planCacheSize
parameter.planCacheSize
参数为新查询引擎设置计划缓存的大小。
Increasing the plan cache size adds more cached query shapes for the query planner. 增加计划缓存大小会为查询计划器添加更多缓存的查询形状。This can improve query performance, but increases memory usage.这可以提高查询性能,但会增加内存使用率。
Stable API
The following sections describe additions to the Stable API introduced in MongoDB 6.0.以下部分描述了对MongoDB 6.0中引入的Stable API的添加。
To see the full list of database commands available in the Stable API, see Stable API Changelog.要查看Stable API中可用的数据库命令的完整列表,请参阅Stable API Changelog。
Database Commands数据库命令
Starting in MongoDB 6.0, the following database commands are supported in the Stable API:从MongoDB 6.0开始,Stable API支持以下数据库命令:
count | V1 |
---|
Aggregation Stages and Operators聚合阶段和运算符
Starting in MongoDB 6.0, the following aggregation stages and operators are supported in the Stable API:从MongoDB 6.0开始,Stable API支持以下聚合阶段和运算符:
Stable API Version | ||
---|---|---|
$bottom | V1 | |
$bottomN | n elements within a group, according to the specified sort order.n 个元素的聚合。 | V1 |
$dateAdd | Date() object by a specified number of time units.Date() 对象增加指定数量的时间单位。 | V1 |
$dateDiff | V1 | |
$dateSubtract | Date() object by a specified number of time units.Date() 对象递减指定数量的时间单位。 | V1 |
$dateTrunc | V1 | |
$densify | V1 | |
$firstN | n elements within a group.n 个元素的聚合。 | V1 |
$firstN | V1 | |
$getField | V1 | |
$lastN | n elements within a group.n 个元素的聚合。 | V1 |
$lastN | V1 | |
$locf | null and missing fields in a window to the last non-null value for the field.null 和缺失字段的值设置为该字段的最后一个非null 值。
| V1 |
$maxN | n elements within a group.n 个元素的聚合。 | V1 |
$maxN | n largest values in an array.n 个值。 | V1 |
$minN | n elements within a group.n 个元素的聚合。 | V1 |
$minN | n smallest values in an array.n 个最小值。 | V1 |
$setField | V1 | |
$setWindowFields | V1 | |
$sortArray | V1 | |
$top | V1 | |
$topN | n elements within a group, according to the specified sort order. | V1 |
$tsIncrement | long .long 形式返回时间戳中的递增序号。
| V1 |
$tsSecond | long .long 的形式返回。
| V1 |
Window Operators窗口运算符
Starting in MongoDB 6.0, the following window operators are supported in the Stable API:从MongoDB 6.0开始,Stable API支持以下窗口运算符:
$addToSet | V1 | |
---|---|---|
$avg | V1 | |
$count | V1 | |
$covariancePop | V1 | |
$covarianceSamp | V1 | |
$denseRank | $setWindowFields stage partition. $setWindowFields 阶段分区中其他文档的位置(称为秩)。 | V1 |
$derivative | V1 | |
$documentNumber | $setWindowFields stage partition. $setWindowFields 阶段分区中的位置(称为文档编号)。 | V1 |
$expMovingAvg | V1 | |
$first | V1 | |
$integral | V1 | |
$last | V1 | |
$locf | null and missing fields in a window to the last non-null value for the field.null 和缺失字段的值设置为该字段的最后一个非null 值。
| V1 |
$max | V1 | |
$min | V1 | |
$push | V1 | |
$rank | $setWindowFields stage partition.$setWindowFields 阶段分区中其他文档的位置(称为秩)。 | V1 |
$shift | $setWindowFields stage partition.$setWindowFields 阶段分区中相对于当前文档的指定位置。 | V1 |
$stdDevPop | V1 | |
$stdDevSamp | V1 | |
$sum | V1 |
Time Series Collections时间序列集合
The following sections describe improvements and new features for time series collections.以下部分介绍时间序列集合的改进和新功能。
Sharded Time Series Collections分片时间序列集合
MongoDB 5.1 provides support for sharded time series collections.MongoDB 5.1提供了对分片时间序列集合的支持。
See:参阅
Sharded Time Series Granularity分片时间序列粒度
Starting in MongoDB 6.0, you can modify the granularity of sharded time series collections.从MongoDB 6.0开始,您可以修改分片时间序列集合的粒度。
Updates and Deletes更新和删除
Starting in MongoDB 5.1, time series collections support update and delete operations with limitations.从MongoDB 5.1开始,时间序列集合支持有限制的更新和删除操作。
Time Series Column Compression时间序列列压缩
Starting in MongoDB 5.2, time series collections use column compression. 从MongoDB 5.2开始,时间序列集合使用列压缩。Column compression adds a number of innovations that work together to significantly improve practical compression, reduce your data's overall storage on disk, and improve read performance.列压缩增加了许多创新,这些创新共同作用,显著提高了实际压缩效果,减少了数据在磁盘上的总体存储,并提高了读取性能。
Starting in MongoDB 6.0, arrays are also compressed as part of the time series column compression.从MongoDB 6.0开始,数组也作为时间序列列压缩的一部分进行压缩。
Support for $geoNear
支持$geoNear
$geoNear
Starting in MongoDB 5.3, you can use the 从MongoDB 5.3开始,您可以在时间序列集合中的任何字段上使用$geoNear
pipeline operator on any field in a time series collection.$geoNear
管道运算符。
Additional Secondary Index Types其他二级索引类型
You can add additional secondary index types to time series collections, including 2dsphere and 2d indexes.可以向时间序列集合添加其他辅助索引类型,包括2dsphere和2d索引。
For all additional indexes and other improvements, see Time Series Secondary Indexes in MongoDB 6.0 and Later.有关所有其他索引和其他改进,请参阅MongoDB 6.0及更高版本中的时序二级索引。
Sort Operations Use Secondary Indexes排序操作使用辅助索引
Sort operations on time series collections can use indexes to improve performance. 时间序列集合上的排序操作可以使用索引来提高性能。For more information and an example, see Use Secondary Indexes to Improve Sort Performance.有关详细信息和示例,请参阅使用辅助索引提高排序性能。
General Improvements一般改进
OpenSSL3 FIPS SupportOpenSSL3 FIPS支持
Starting in MongoDB 6.0.7, FIPS mode supports OpenSSL3 for the following operating systems:从MongoDB 6.0.7开始,FIPS模式支持以下操作系统的OpenSSL3:
-
Ubuntu 22.04
-
RHEL 9
-
Amazon Linux 2023
Capped Collections Improvements上限集合改进
Starting in MongoDB 6.0, you can change a capped collection's maximum size, either in bytes or in number of documents, using the 从MongoDB 6.0开始,您可以使用collMod
command. collMod
命令更改封顶集合的最大大小,以字节或文档数为单位。See Resize a Capped Collection for more details.有关详细信息,请参阅调整封顶集合的大小。
numOrphanDocs
Field Added to collStats Command添加到collStats命令的字段
Starting in MongoDB 6.0, the collStats output includes the 从MongoDB 6.0开始,collStats输出包括collStats.numOrphanDocs
field that shows the number of orphaned documents in the collection.collStats.numOrphanDocs
字段,该字段显示集合中孤立文档的数量。
Exclude Embedded Fields in serverStatus
Output排除serverStatus
输出中的嵌入字段
serverStatus
OutputStarting in MongoDB 6.0 (and 5.0.9, 4.4.15), you can exclude embedded fields from the 从MongoDB 6.0(和5.0.9、4.4.15)开始,您可以从serverStatus
output.serverStatus
输出中排除嵌入字段。
Connections连接
Starting in MongoDB 6.0, the 从MongoDB 6.0开始,Mongo()
connection object has the following new methods:Mongo()
连接对象有以下新方法:
-
Mongo.getWriteConcern()
returns the write concern返回写入问题 -
Mongo.setWriteConcern()
sets the write concern设置写入问题
Support for Diagnostic Backtrace Generation in arm64
支持arm64
中的诊断回溯生成
arm64
Starting in MongoDB 6.0 (and 5.0.10, 4.4.15), diagnostic backtrace generation in 从MongoDB 6.0(和5.0.10.4.4.15)开始,支持arm64
is supported.arm64
中的诊断回溯生成。
Configure Refresh Interval for Cached LDAP User Information配置缓存LDAP用户信息的刷新间隔
Starting in MongoDB 5.2, you can use the following new server parameters to configure the refresh interval for cached LDAP user information:从MongoDB 5.2开始,您可以使用以下新的服务器参数来配置缓存LDAP用户信息的刷新间隔:
Starting in MongoDB 5.2, the update interval for cached user information retrieved from an LDAP server depends on 从MongoDB 5.2开始,从LDAP服务器检索的缓存用户信息的更新间隔取决于ldapShouldRefreshUserCacheEntries
:ldapShouldRefreshUserCacheEntries
:
-
If true, use如果为ldapUserCacheRefreshInterval
.true
,请使用ldapUserCacheRefreshInterval
。 -
If false, use如果为ldapUserCacheInvalidationInterval
.false
,请使用ldapUserCacheInvalidationInterval
。
Changes Affecting Compatibility影响兼容性的更改
Some changes can affect compatibility and may require user actions. 某些更改可能会影响兼容性,并且可能需要用户操作。For a detailed list of compatibility changes, see Compatibility Changes in MongoDB 6.0.有关兼容性更改的详细列表,请参阅MongoDB 6.0中的兼容性更改。
Upgrade Procedures升级过程
Feature Compatibility Version功能兼容性版本
To upgrade to MongoDB 6.0 from a 5.0 deployment, the 5.0 deployment must have 要从5.0部署升级到MongoDB 6.0,5.0部署必须将featureCompatibilityVersion
set to 5.0
. featureCompatibilityVersion
设置为5.0
。To check the version:要检查版本:
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
To upgrade to MongoDB 6.0, refer to the upgrade instructions specific to your MongoDB deployment:要升级到MongoDB 6.0,请参阅针对您的MongoDB部署的升级说明:
If you need guidance on upgrading to 6.0, MongoDB professional services offer major version upgrade support to help ensure a smooth transition without interruption to your MongoDB application. 如果您需要升级到6.0的指导,MongoDB专业服务提供主要版本升级支持,以帮助确保在不中断MongoDB应用程序的情况下顺利过渡。To learn more, see MongoDB Consulting.要了解更多信息,请参阅MongoDB咨询。
Downgrade Consideration降级考虑
MongoDB only supports single-version downgrades. You cannot downgrade to a release that is multiple versions behind your current release.MongoDB只支持单版本降级。您不能降级到比当前版本落后多个版本的版本。
For example, you may downgrade a 6.0-series to a 5.0-series deployment. However, further downgrading that 5.0-series deployment to a 4.4-series deployment is not supported.例如,您可以将6.0系列部署降级为5.0系列部署。但是,不支持将5.0系列部署进一步降级为4.4系列部署。
Download下载
To download MongoDB 6.0, go to the MongoDB Download Center.要下载MongoDB 6.0,请访问MongoDB下载中心。
Known Issues已知问题
This section describes known issues in MongoDB 6.0 and their resolution status.本节介绍MongoDB 6.0中的已知问题及其解决状态。
In Version | Issue | Status |
---|---|---|
6.0.0 | SERVER-68062$geoNear 的多阶段聚合可能违反约束。 | Resolved in 6.0.1. |
Report an Issue报告问题
To report an issue, see https://github.com/mongodb/mongo/wiki/Submit-Bug-Reports for instructions on how to file a JIRA ticket for the MongoDB server or one of the related projects.要报告问题,请参阅https://github.com/mongodb/mongo/wiki/Submit-Bug-Reports,以了解有关如何为MongoDB服务器或某个相关项目提交JIRA票证的说明。