MongoDB爱好者
垂直技术交流平台

MongoDB Jira系列-3.0.5修复的那些事儿

大家好,我是E叔。
经常有朋友向我咨询版本选型的问题。
受到老毕同学的启发,E叔决定为大家搬运+翻译+简单解释 MongoDB3.0.4+以后各个版本fixed的比较重要的jira issues。大家可以根据需求来决定版本选型。
今天是3.0.5篇。

Issues fixed in 3.0.5

以下均是3.0.5中修复了的jira issues。(比较重要的issues)
由于人肉整理,难免有遗漏,欢迎补充。

Issues fixed in 3.0.5

SERVER-19513

truncate 一个capped 表的时候 可能其索引在WT中不会删除。

cover index 的查询可能就会返回出这些没删除的索引的documents

SERVER-19375

选择syncsource的时候,此前是比较的最新的数据,应该比较最新oplog数据。

SERVER-19189(与SERVER-18829有关联)

提高了WT引擎在大量threads下的性能。

SERVER-18829

当在WT中进行大量index的建立的时候,会超过我们WT设置的最大cache,可能会OOM之类

SERVER-19178

由于WT tracks和expires capped表的方式问题,性能有所损耗(在大量inserts的情况,)

注意:oplog就是个capped collection!

现在WT会cache住capped的第一个没有过期的document在cache中,提高了效率。

SERVER-18994

producer thread can continue producing after a node becomes primary

SERVER-18926

full text search 在WT中效率很低,使用内存较多

yield过程中 intermediate的数据buffer在cache中,但是在$text 和geoNear的long queries有个bug:

In particular, if a such a query yields y times and buffers d documents, the overall time spent in yield-preparation was O(yd). With the fix, the time complexity is reduced to O(y).

SERVER-18902

超过1MB大小的document,WT速度slow down

原因如下

WiredTiger does not store documents larger than its default leaf_value_max in the in-memory cache. The leaf_value_max value is 1 megabyte. As a result, operations that read or modify larger documents are significantly less efficient than with smaller documents.

Starting with MongoDB 3.0.5 all documents are stored in the in-memory WritedTiger cache, but this change only impacts collections created after upgrading to 3.0.5 or later. Existing collections are unaffected by this change.

WT的每个leaf的leaf_value_max是1MB,如果超过1MB就存储多个,这时候效率变差。

Users with documents larger than 1 megabyte may use the –wiredTigerCollectionConfigString ‘leaf_value_max=‘configuration option to increase the value of leaf_value_max beyond 1 megabyte to improve performance when accessing large documents.

For example, to ask WiredTiger to put in its cache documents of up to 16 megabytes in size, use:

–wiredTigerCollectionConfigString ‘leaf_value_max=16000000’

Note that this setting only impacts collections created after the change. Existing collections are not be affected by this change, so users with existing collections containing large documents may want to move them to a newly created collection, replicate them to new instances running 3.0.5, or perform a dump + restore cycle on these collections.

3.0.5修复,但是只有在3.0.5之后建立的表才有效,可以重新建立表,导入数据之类。

SERVER-18838

当意外宕机(如断电)的时候,

这些操作:database creation

database dropping

collection creation

collection dropping

index creation

index dropping

将可能会作用在invalid的data set中,导致重启后recover失败

SERVER-17386

WT 不限制mongo打开的wt session。这样造成了一定的内存泄露

WiredTiger allows MongoDB to open an unbounded number of WiredTiger sessions, which means that despite a limited number of WiredTiger cursors per session, the total number of cached sessions an cursors may lead to excessive memory use.


关于作者



周李洋, 社区常用ID eshujiushiwo, Teambition运维总监 关注Mysql与MongoDB技术,数据架构,服务器架构,高效运维等。 mongo-mopre,mongo-mload作者,任CSDN mongodb版主,MongoDB上海用户组发起人, MongoDB官方翻译组核心成员,MongoDB中文站博主,MongoDB Contribution Award获得者, MongoDB Days Beijing 2014演讲嘉宾。 联系方式:378013446 MongoDB上海用户组:313290880 欢迎交流。

转载请注明链接:http://www.mongoing.com/jira_3.0.5

赞(7)
未经允许不得转载:MongoDB中文社区 » MongoDB Jira系列-3.0.5修复的那些事儿

评论 抢沙发

评论前必须登录!