On this page
MongoDB 3.0 发行说明
在本页面
- 2015 年 3 月 3 日*
MongoDB 3.0 现在可用。主要功能包括对 WiredTiger 存储引擎,可插拔存储引擎 API,SCRAM-SHA-1
身份验证机制和改进的explain
功能的支持。
MongoDB Ops Manager(包括自动化,备份和监视)现在也可用。有关更多信息,请参见Ops Manager 文档和Ops Manager 发行说明。
Minor Releases
-
- [MMAP](release-notes-3.0-changelog.html#id34)
-
- [mongoimport](release-notes-3.0-changelog.html#mongoimport) - [mongotop](release-notes-3.0-changelog.html#mongotop)
-
- [MMAPv1](release-notes-3.0-changelog.html#id117) - [RocksDB](release-notes-3.0-changelog.html#rocksdb)
-
- [MMAPv1](release-notes-3.0-changelog.html#id134) - [RocksDB](release-notes-3.0-changelog.html#id135)
3.0.15 – 2017 年 5 月 15 日
Issues fixed:
SERVER-27164:当 CRUD 操作隐式在同一数据库上创建集合时,在初始同步或稳态复制期间出现死锁。
SERVER-28548:在 MMAPv1 中,如果记录不再存在,则索引读取器/写入器可以返回无效数据。
3.0.14 – 2016 年 11 月 4 日
Issues fixed:
- 3.0.13 上不正确的内存访问会触发分段错误:SERVER-26889
3.0.13 – 2016 年 10 月 31 日
Issues fixed:
Debian 8(Jessie)软件包:SERVER-18329
升级到与 Perl 兼容的正则表达式(PCRE 8.39):SERVER-24662
在 2dsphere 索引构建期间限制内存使用:SERVER-25075
3.0.12 – 2016 年 5 月 9 日
Issues fixed:
后台索引构建可能会导致与索引文档不对应的额外索引键条目:SERVER-22970
可以创建包含嵌入式空字符的文档:SERVER-7005
在 awaitWiredTiger 高速缓存驱逐时保留 IX GlobalLock:SERVER-22964
3.0.11 – 2016 年 3 月 31 日
Issues fixed:
- 对于 MongoDB 3.0.9 和 MongoDB 3.0.10,在块迁移期间,对目标块中未反映的对迁移块中文档的插入和更新操作:SERVER-23425
3.0.10 – 2016 年 3 月 8 日
Issues fixed:
secondaryPreferred的阅读首选项可能会使用未版本控制的连接而结束:SERVER-18671
对于 MMAPv1 日记记录,“最后序列号”文件(
lsn
文件)可能在同步到数据文件的位置SERVER-22261之前。oplog 删除的数据大小更改可能会溢出 32 位 int:SERVER-22634
写入工作负载SERVER-22898下 WiredTiger 数据库的高度碎片化。
3.0.9 – 2016 年 1 月 26 日
Issues fixed:
如果同时更新文档,则指定排序和批处理大小的查询可能会乱序返回结果。 SERVER-19996
在 WiredTiger 下,大量的创建和删除集合会导致
listDatabases
变慢。 SERVER-20961身份验证失败消息包括服务器 IP 地址而不是 Client 端 IP 地址。 SERVER-22054
3.0.8 – 2015 年 12 月 15 日
Issues fixed:
findAndModify在mongos上可以插入错误的分片。 SERVER-20407。
WiredTiger 提交可见性导致未找到文档。 SERVER-21275。
oplog 可以增长到配置大小的 3 倍。 SERVER-21553
3.0.7 – 2015 年 10 月 13 日
Issues fixed:
WiredTiger 内存处理和性能问题:SERVER-20159,SERVER-20204,SERVER-20091和SERVER-20176。
在挂起的降级期间重新配置可能会阻止主节点降级:SERVER-20262。
内置角色需要其他特权:SERVER-19131,SERVER-15893和SERVER-13647。
3.0.6 – 2015 年 8 月 24 日
Issues fixed:
WiredTiger 稳定性问题:SERVER-19751,SERVER-19673和SERVER-19573。
SSL 和审核之间的交互:SERVER-19538。
分片系统SERVER-19464上的聚合$sort。
3.0.5 – 2015 年 7 月 28 日
解决的问题和改进:
改进了 WiredTiger 的上限集合和复制(SERVER-19178,SERVER-18875和SERVER-19513)。
WiredTiger 的其他性能改进(SERVER-19189)和与缓存和会话使用有关的改进(SERVER-18829 SERVER-17836)。
长时间运行的查询(尤其是
$text
和$near
查询SERVER-18926)的性能提高。
3.0.4 – 2015 年 6 月 16 日
Issues fixed:
从具有 WiredTiger 主线程的分片迁移数据块期间,缺少并发插入的写入:SERVER-18822
使用 Wired Tiger Storage 引擎SERVER-18213与多更新更新写入冲突:SERVER-18213
次要读取可能会阻止复制:SERVER-18190
具有 WiredTiger 和大于 16kb 的文档的 Windows 上的性能:SERVER-18079
系统意外重启后,未正确恢复 WiredTiger 数据文件:SERVER-18316
3.0.3 – 2015 年 5 月 12 日
Issues fixed:
弃用db.eval()并添加警告:SERVER-17453
Windows 服务停止操作可能会突然终止:SERVER-17802
在 WiredTiger 和 RocksDB 存储引擎上使用键太大而无法索引的更新引起的崩溃:SERVER-17882
在eval环境中对mapReduce的支持不一致:SERVER-17889
3.0.2 – 2015 年 4 月 9 日
Issues fixed:
2d
$nearSphere:SERVER-17469的查询计划效率低下在 WiredTiger 的维修操作期间从mongod开始:SERVER-17652和SERVER-17729
WiredTiger 和
zlib
块压缩导致无效的压缩流错误:SERVER-17713插入大型索引数组的内存使用问题:SERVER-17616
3.0.1 – 2015 年 3 月 17 日
Issues fixed:
WiredTiger 在插入点和检查点之间的竞争状况可能会导致记录丢失:SERVER-17506。
WiredTiger 的上限集合实现导致服务器崩溃:SERVER-17345。
最初与重复的
_id
个条目同步:SERVER-17487。MMAPv1 中的日志锁和操作日志收集锁之间的死锁条件:SERVER-17416。
Major Changes
可插拔存储引擎 API
MongoDB 3.0 引入了可插拔的存储引擎 API,允许第三方为 MongoDB 开发存储引擎。
WiredTiger
MongoDB 3.0 引入了对WiredTiger存储引擎的支持。有了 WiredTiger 的支持,MongoDB 现在支持两个存储引擎:
MMAPv1,MongoDB 的早期版本中可用的存储引擎,以及 MongoDB 3.0 的默认存储引擎,以及
WiredTiger,仅在 MongoDB 3.0 的 64 位版本中可用。
WiredTiger Usage
WiredTiger 是默认 MMAPv1 存储引擎的替代产品。 WiredTiger 支持所有 MongoDB 功能,包括报告服务器,数据库和集合统计信息的操作。但是,切换到 WiredTiger 要求更改磁盘上的存储格式。有关将存储引擎更改为 WiredTiger 的说明,请参阅将 MongoDB 升级到 3.0文档中的相应部分。
MongoDB 3.0 副本集和分片集群可以使成员具有不同的存储引擎;但是,性能可能会因工作负载而异。有关详细信息,请参见将 MongoDB 升级到 3.0文档中的相应部分。
WiredTiger 存储引擎需要最新的官方 MongoDB 驱动程序。有关更多信息,请参见WiredTiger 和驱动程序版本兼容性。
See also
WiredTiger Configuration
要配置 WiredTiger 存储引擎的行为和属性,请参阅storage.wiredTiger
配置选项。您可以设置命令行上的 WiredTiger 选项。
See also
WiredTiger 并发和压缩
3.0 WiredTiger 存储引擎提供文档级锁定和压缩。
默认情况下,WiredTiger 使用snappy压缩库压缩收集数据。默认情况下,WiredTiger 在所有索引上使用prefix compression。
See also
MMAPv1 Improvements
MMAPv1 并发改进
在 3.0 版中,MMAPv1 存储引擎添加了对集合级锁定的支持。
MMAPv1 配置更改
为了支持多个存储引擎,MMAPv1 的某些配置设置已更改。参见配置文件选项更改。
MMAPv1 记录分配行为更改
MongoDB 3.0 不再实现动态记录分配并弃用paddingFactor。在使用 MMAPv1 的实例中,集合的默认分配策略是2 分配的力量,此策略已得到改进,可以更好地处理大型文档。在 3.0 中,usePowerOf2Sizes
标志将被忽略,因此 2 策略的幂将用于所有未设置noPadding
标志的集合。
对于工作负载仅包含插入或就地更新(例如递增计数器)的集合,可以禁用 2 策略的幂。要为集合禁用 2 的幂策略,请使用带有noPadding标志的collMod命令或带有noPadding
选项的db.createCollection()方法。
Warning
如果工作负荷包括删除或任何可能导致文档增长的更新,请不要设置noPadding
。有关更多信息,请参见无填充分配策略。
当磁盘空间不足时,MongoDB 3.0 不再在所有写入操作中出错,而仅在所需的磁盘分配失败时才会出错。这样,MongoDB 现在允许就地更新并在磁盘空间不足时将其删除。
See also
Replica Sets
副本集成员数增加
在 MongoDB 3.0 中,副本集最多可包含 50 个成员。 [1]以下驱动程序支持较大的副本集:
C#(.NET)驱动程序 1.10
Java 驱动程序 2.13
Python 驱动程式(PyMongo)3.0
Ruby 驱动程式 2.0
Node.JS 驱动程序 2.0
C,C,Perl 和旧版 PHP 驱动程序以及早期版本的 Ruby,Python 和 Node.JS 驱动程序会串行发现和监视副本集成员,因此不适合与大型副本集一起使用。
[1] | 投票成员的最大数量保持为 7. |
副本集降级行为更改
replica set的primary成员下台的过程进行了以下更改:
在降级之前,replSetStepDown将尝试终止长时间运行的用户操作,这些操作将阻止主数据库降级,例如索引构建,写操作或 Map 减少作业。
为了帮助防止回滚,replSetStepDown将 await 可选的辅助节点赶上主要节点的状态,然后再退出。以前,主节点要等到辅助节点赶上主节点 10 秒以内(即复制延迟为 10 秒或更短的辅助节点)后才能退出。
replSetStepDown现在允许用户指定
secondaryCatchUpPeriodSecs
参数,以指定主节点在降级之前应 await 辅助节点追赶多长时间。
其他副本集的操作更改
初始同步可以更有效地为每个集合构建索引,并使用线程批量应用操作日志条目。
w: "majority"写关注的定义已更改为意味着投票节点居多。
对于辅助成员上预先存在的集合,MongoDB 3.0 不再自动构建缺少的
_id
索引。
See also
Sharded Clusters
MongoDB 3.0 对分片群集提供了以下增强功能:
添加一个新的sh.removeTagRange()助手,以改善对带有标签的分片集合的 Management。新的sh.removeTagRange()方法是sh.addTagRange()的补充。
提供更可预测的读取首选项行为。 mongos实例在执行读取操作时不再将连接固定到副本集的成员。而是,每个读取操作mongos重新评估read preferences,以在读取首选项更改时提供更可预测的读取首选项行为。
提供新的
writeConcern
设置来配置块迁移操作的write concern。您可以为balancer以及moveChunk和cleanupOrphaned命令配置writeConcern
设置。改善平衡器操作的可见性。 sh.status()包含有关平衡器状态的信息。有关详情,请参见sh.status()。
Security Improvements
MongoDB 3.0 包括以下安全性增强功能:
MongoDB 3.0 添加了新的SCRAM-SHA-1质询响应用户身份验证机制。如果您当前的驱动程序版本不支持
SCRAM-SHA-1
,则SCRAM-SHA-1
需要驱动程序升级。有关支持SCRAM-SHA-1
的驱动程序版本,请参见Requirements。使用Localhost Exception访问 MongoDB 时增加限制。有关详细信息,请参见Localhost 异常已更改。
See also
Improvements
新的查询自省系统
MongoDB 3.0 包括一个新的查询自检系统,该系统提供了改进的输出格式以及对查询计划和查询执行的更细粒度的自检。
有关详细信息,请参见新的db.collection.explain()方法和新的explain命令以及更新的cursor.explain()方法。
有关新输出格式的信息,请参见Explain Results。
Enhanced Logging
为了提高用于诊断的日志消息的可用性,MongoDB 将某些日志消息归类为特定的组件或操作,并提供了为这些组件设置详细级别的功能。有关信息,请参阅Log Messages。
MongoDB 工具增强功能
现在,除mongosniff和mongoperf之外的所有 MongoDB 工具都用 Go 编写,并作为一个单独的项目进行维护。
并行化mongodump和mongorestore的新选项。您可以使用
--numParallelCollections
选项控制mongorestore一次还原的集合的数量。mongodump的新选项
-excludeCollection
和--excludeCollectionsWithPrefix
排除了集合。mongorestore现在除了从文件中读取 BSON 数据外,还可以接受来自标准 Importing 的 BSON 数据 Importing。
向mongoimport,mongorestore和mongofiles添加了可配置的write concern。使用
--writeConcern
选项。默认的 writeConcern 已更改为'w:majority'。mongofiles现在允许您使用
--prefix
选项配置 GridFS 前缀,以便可以使用自定义名称空间并将多个 GridFS 名称空间存储在单个数据库中。
See also
Indexes
如果受索引构建影响的数据库或集合发生dropDatabase,drop,dropIndexes操作,则后台索引构建将不再自动中断。像 2.6 中一样,dropDatabase,drop和dropIndexes命令仍然会失败,并显示错误消息
a background operation is currently running
。如果您为createIndexes命令指定了多个索引,
该命令只扫描一次集合,并且
- 如果要在前台构建至少一个索引,则该操作将在前台构建所有指定的索引。
对于分片集合,如果索引包含分片键,则索引现在可以cover queries对mongos执行。
See also
Query Enhancements
MongoDB 3.0 包括以下查询增强功能:
对于地理空间查询,添加了对$geoIntersects和$geoWithin查询的“大”多边形的支持。 “大”多边形是面积大于单个半球的单环 GeoJSON 多边形。有关详细信息,请参见$geometry,$geoIntersects和$geoWithin。
对于aggregate(),添加新的$dateToString运算符,以方便将日期转换为格式化的字符串。
添加$eq查询运算符以查询相等条件。
See also
发行版和受支持的版本
现在,大多数非企业级 MongoDB 发行版都支持 TLS/SSL。以前,仅 MongoDB Enterprise 发行版附带 TLS/SSL 支持;对于非企业发行版,您必须使用--ssl
标志(即scons --ssl
)在本地构建 MongoDB。
32 位 MongoDB 构建可用于测试,但不可用于生产。 32 位 MongoDB 构建不包括 WiredTiger 存储引擎。
针对 Solaris 的 MongoDB 构建不支持 WiredTiger 存储引擎。
MongoDB 构建可用于 Windows Server 2003 和 Windows Vista(作为“ 64 位旧版”),但是官方最低支持的 Windows 版本是 Windows Server 2008.
See also
Package Repositories
适用于 3.0 及更高版本的非企业级 MongoDB Linux 软件包位于新的存储库中。按照相应的Linux 安装说明从新位置安装 3.0 软件包。
MongoDB 企业功能
Auditing
MongoDB Enterprise 中的Auditing可以对审核消息中的任何字段进行过滤,包括param文档中返回的字段。此增强功能与auditAuthorizationSuccess参数一起,使审核能够筛选 CRUD 操作。但是,启用auditAuthorizationSuccess审核所有授权成功比单独审核授权失败更能降低性能。
Additional Information
影响兼容性的更改
3.0 中的某些更改可能会影响compatibility,并且可能需要用户采取措施。有关兼容性更改的详细列表,请参见MongoDB 3.0 中的兼容性更改。
Upgrade Process
-
- [Replace 2\.6 binaries\.](release-notes-3.0-upgrade.html#replace-2-6-binaries) - [Change Storage Engine for Standalone to WiredTiger](release-notes-3.0-upgrade.html#change-storage-engine-for-standalone-to-wiredtiger)
-
- [Upgrade Binaries](release-notes-3.0-upgrade.html#id1)
-
- [Step down the replica set primary\.](release-notes-3.0-upgrade.html#step-down-the-replica-set-primary) - [Upgrade the primary\.](release-notes-3.0-upgrade.html#upgrade-the-primary) - [Change Replica Set Storage Engine to WiredTiger](release-notes-3.0-upgrade.html#change-replica-set-storage-engine-to-wiredtiger)
-
- [Upgrade Sharded Clusters](release-notes-3.0-upgrade.html#upgrade-sharded-clusters)
-
- [Upgrade the cluster's meta data\.](release-notes-3.0-upgrade.html#upgrade-the-cluster-s-meta-data) - [Ensure mongos \-\-upgrade process completes successfully\.](release-notes-3.0-upgrade.html#ensure-mongos-upgrade-process-completes-successfully) - [Upgrade the remaining mongos instances to 3\.0\.](release-notes-3.0-upgrade.html#upgrade-the-remaining-mongos-instances-to-3-0) - [Upgrade the config servers\.](release-notes-3.0-upgrade.html#upgrade-the-config-servers) - [Upgrade the shards\.](release-notes-3.0-upgrade.html#upgrade-the-shards) - [Re\-enable the balancer\.](release-notes-3.0-upgrade.html#re-enable-the-balancer) - [Change Sharded Cluster Storage Engine to WiredTiger](release-notes-3.0-upgrade.html#change-sharded-cluster-storage-engine-to-wiredtiger)
-
- [Sharded cluster authSchemaUpgrade consideration\.](release-notes-3.0-scram.html#sharded-cluster-authschemaupgrade-consideration)
确保 3.0 mongod 与 WiredTiger 一起运行。
- [Export the data using mongodump\.](release-notes-3.0-downgrade.html#export-the-data-using-mongodump) - [Create data directory for MMAPv1\.](release-notes-3.0-downgrade.html#create-data-directory-for-mmapv1) - [Restart the mongod with MMAPv1\.](release-notes-3.0-downgrade.html#restart-the-mongod-with-mmapv1) - [Upload the exported data using mongorestore\.](release-notes-3.0-downgrade.html#upload-the-exported-data-using-mongorestore) - [Downgrade Binaries](release-notes-3.0-downgrade.html#downgrade-binaries)
-
- [Replace with 2\.6 binaries\.](release-notes-3.0-downgrade.html#replace-with-2-6-binaries)
-
- [Prepare data directory for MMAPv1\.](release-notes-3.0-downgrade.html#prepare-data-directory-for-mmapv1) - [Restart the secondary member with MMAPv1\.](release-notes-3.0-downgrade.html#restart-the-secondary-member-with-mmapv1) - [Downgrade Binaries](release-notes-3.0-downgrade.html#id2)
-
- [Step down the primary\.](release-notes-3.0-downgrade.html#step-down-the-primary) - [Replace and restart former primary mongod\.](release-notes-3.0-downgrade.html#replace-and-restart-former-primary-mongod)
-
- [Change Storage Engine to MMAPv1](release-notes-3.0-downgrade.html#id3)
-
- [Change Config Servers to Use MMAPv1](release-notes-3.0-downgrade.html#change-config-servers-to-use-mmapv1)
-
- [Stop the last config server listed in the mongos' configDB setting\.](release-notes-3.0-downgrade.html#stop-the-last-config-server-listed-in-the-mongos-configdb-setting) - [Export data of the second config server listed in the mongos' configDB setting\.](release-notes-3.0-downgrade.html#export-data-of-the-second-config-server-listed-in-the-mongos-configdb-setting) - [For the second config server, create a new data directory for MMAPv1\.](release-notes-3.0-downgrade.html#for-the-second-config-server-create-a-new-data-directory-for-mmapv1) - [Restart the second config server with MMAPv1\.](release-notes-3.0-downgrade.html#restart-the-second-config-server-with-mmapv1) - [Upload the exported data using mongorestore to the second config server\.](release-notes-3.0-downgrade.html#upload-the-exported-data-using-mongorestore-to-the-second-config-server) - [Shut down the second config server\.](release-notes-3.0-downgrade.html#shut-down-the-second-config-server) - [Restart the third config server\.](release-notes-3.0-downgrade.html#restart-the-third-config-server) - [Export data of the third config server\.](release-notes-3.0-downgrade.html#export-data-of-the-third-config-server) - [For the third config server, create a new data directory for MMAPv1\.](release-notes-3.0-downgrade.html#for-the-third-config-server-create-a-new-data-directory-for-mmapv1) - [Restart the third config server with MMAPv1\.](release-notes-3.0-downgrade.html#restart-the-third-config-server-with-mmapv1) - [Upload the exported data using mongorestore to the third config server\.](release-notes-3.0-downgrade.html#upload-the-exported-data-using-mongorestore-to-the-third-config-server) - [Export data of the first config server listed in the mongos' configDB setting\.](release-notes-3.0-downgrade.html#export-data-of-the-first-config-server-listed-in-the-mongos-configdb-setting) - [For the first config server, create data directory for MMAPv1\.](release-notes-3.0-downgrade.html#for-the-first-config-server-create-data-directory-for-mmapv1) - [Restart the first config server with MMAPv1\.](release-notes-3.0-downgrade.html#restart-the-first-config-server-with-mmapv1) - [Upload the exported data using mongorestore to the first config server\.](release-notes-3.0-downgrade.html#upload-the-exported-data-using-mongorestore-to-the-first-config-server) - [Enable writes to the sharded cluster's metadata\.](release-notes-3.0-downgrade.html#enable-writes-to-the-sharded-cluster-s-metadata) - [Re\-enable the balancer\.](release-notes-3.0-downgrade.html#re-enable-the-balancer) - [Downgrade Binaries](release-notes-3.0-downgrade.html#id4)
-
- [Downgrade each shard, one at a time\.](release-notes-3.0-downgrade.html#downgrade-each-shard-one-at-a-time) - [Downgrade the config servers\.](release-notes-3.0-downgrade.html#downgrade-the-config-servers) - [Downgrade the mongos instances\.](release-notes-3.0-downgrade.html#downgrade-the-mongos-instances) - [Re\-enable the balancer\.](release-notes-3.0-downgrade.html#id7)
有关完整的升级说明,请参见将 MongoDB 升级到 3.0。
Download
要下载 MongoDB 3.0,请转到downloads page。
See also