<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:13:37 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-47222] Mongos high cpu usage on getShardIdsForRange while dealing shard key range query</title>
                <link>https://jira.mongodb.org/browse/SERVER-47222</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;We have encountered an issue that after upgrading mongo from 3.4 to 4.0(through 3.6), the mongos&apos;s cpu usage has raised for multiple times. After some investigation we found the mainly cpu cost is doing the ShardId string compare from the&#160;getShardIdsForRange() call while inserting ShardId into the result set.&#160; The case was that user&apos;s query range for the shard key was &lt;span class=&quot;error&quot;&gt;&amp;#91;MinKey, MaxKey&amp;#93;&lt;/span&gt;(e.g., doing a range query on a hashed shard key), and the collection&apos;s routing table(chunk map) was very large(about 100k chunks). So there will be tens of thousands of inserting into the ShardId result set, costing a lot of cpus. And I notice that in 3.4, there was a ChunkRangeMap that maintains each shard&apos;s chunk ranges which can optimize this procedure. I noticed that &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33929&quot; title=&quot;Remove ChunkRangeMap from the chunk manager&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33929&quot;&gt;&lt;del&gt;SERVER-33929&lt;/del&gt;&lt;/a&gt; has removed this ChunkRangeMap due to some reason but bringing this performance degradation.&#160; To resolve this issue, I think we can have a fast path for&#160;getShardIdsForRange() when the range(all shard key fields) is &lt;span class=&quot;error&quot;&gt;&amp;#91;MinKey, MaxKey&amp;#93;&lt;/span&gt;, we only need to return all ShardIds through&#160;getAllShardIds(). Looking forward for your feedback. Thanks!&lt;/p&gt;</description>
                <environment></environment>
        <key id="1299611">SERVER-47222</key>
            <summary>Mongos high cpu usage on getShardIdsForRange while dealing shard key range query</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="blake.oler@mongodb.com">Blake Oler</assignee>
                                    <reporter username="mingyan.zc@gmail.com">Cen Zheng</reporter>
                        <labels>
                    </labels>
                <created>Wed, 1 Apr 2020 10:03:33 +0000</created>
                <updated>Tue, 14 Apr 2020 16:49:28 +0000</updated>
                            <resolved>Fri, 10 Apr 2020 16:38:15 +0000</resolved>
                                    <version>4.2.5</version>
                    <version>4.0.17</version>
                                                    <component>Sharding</component>
                                        <votes>1</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="3035806" author="mingyan.zc@gmail.com" created="Sat, 11 Apr 2020 02:39:41 +0000"  >&lt;p&gt;Hi, Blake,&lt;/p&gt;

&lt;p&gt;Got it, thanks!&lt;/p&gt;</comment>
                            <comment id="3035112" author="blake.oler" created="Fri, 10 Apr 2020 16:37:42 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mingyan.zc%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;mingyan.zc@gmail.com&quot;&gt;mingyan.zc@gmail.com&lt;/a&gt;, this issue has already been observed in a separate HELP ticket, and we have a fix scheduled to complete in the upcoming quarter. Closing this as a duplicate of the scheduled fix.&lt;/p&gt;</comment>
                            <comment id="3028611" author="mingyan.zc@gmail.com" created="Tue, 7 Apr 2020 02:00:20 +0000"  >&lt;p&gt;Hi Carl,&lt;/p&gt;

&lt;p&gt;Thanks, this mongos is not the only process running on the host. But I think this is irrelevant.&lt;/p&gt;</comment>
                            <comment id="3028106" author="carl.champain" created="Mon, 6 Apr 2020 19:49:54 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mingyan.zc%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;mingyan.zc@gmail.com&quot;&gt;mingyan.zc@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Can you please confirm whether this&#160;&lt;tt&gt;mongos&lt;/tt&gt;&#160;is the only process running on the host?&lt;/p&gt;

&lt;p&gt;We&apos;re passing this ticket along to the appropriate team for additional investigation. Updates will be posted on this ticket as they happen.&lt;/p&gt;

&lt;p&gt;Thank you,&lt;br/&gt;
Carl&lt;br/&gt;
&#160;&lt;/p&gt;</comment>
                            <comment id="3026203" author="mingyan.zc@gmail.com" created="Sat, 4 Apr 2020 03:08:06 +0000"  >&lt;p&gt;Hi Carl,&lt;/p&gt;

&lt;p&gt;I have uploaded the files needed, please check!&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                            <comment id="3025144" author="carl.champain" created="Fri, 3 Apr 2020 15:08:24 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mingyan.zc%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;mingyan.zc@gmail.com&quot;&gt;mingyan.zc@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for the report.&lt;br/&gt;
 To help us investigate this issue, can you please:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Archive (tar or zip) the &lt;tt&gt;$dbpath/diagnostic.data&lt;/tt&gt; directory (the contents are described &lt;a href=&quot;https://docs.mongodb.com/manual/administration/analyzing-mongodb-performance/#full-time-diagnostic-data-capture&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;).&lt;/li&gt;
	&lt;li&gt;Provide the logs covering this behavior.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I&apos;ve created a secure &lt;a href=&quot;https://10gen-httpsupload.s3.amazonaws.com/upload_forms/41f0ef15-b824-4391-8112-d13c7c2b3373.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;upload portal&lt;/a&gt; for you. Files uploaded to this portal are visible only to MongoDB employees and are routinely deleted after some time.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
 Carl&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="1203695">SERVER-46487</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="1299596">SERVER-47221</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000mqZiaQAE]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 3 Apr 2020 15:08:24 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 43 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 43 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>blake.oler@mongodb.com</customfieldvalue>
            <customfieldvalue>carl.champain@mongodb.com</customfieldvalue>
            <customfieldvalue>mingyan.zc@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxcozz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hx0c8n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3837">Sharding 2020-04-20</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxcb9b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>