<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:04:40 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-43985] Make mongos pre-cache the routing table on startup</title>
                <link>https://jira.mongodb.org/browse/SERVER-43985</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Problemstatement&quot;&gt;&lt;/a&gt;Problem statement&lt;/h4&gt;

&lt;p&gt;There are several types of performance problems due to the routing metadata. One is the predictable, high perf impact of mongos fetching the entire routing table from the config server at cold start-up.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Proposal&quot;&gt;&lt;/a&gt;Proposal&lt;/h4&gt;

&lt;p&gt;Make mongos preload the routing table for all collections on startup.&lt;/p&gt;

&lt;p&gt;1) Use &lt;a href=&quot;https://github.com/mongodb/mongo/blob/22922911b7c8fc8acf3adabcf4c13b80e5e3595d/src/mongo/s/catalog/sharding_catalog_client.h#L132&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ShardingCatalogClient::getAllDBs&lt;/a&gt; to get a vector of all the databases.&lt;/p&gt;

&lt;p&gt;2) For each database in the vector, use&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/22922911b7c8fc8acf3adabcf4c13b80e5e3595d/src/mongo/s/catalog/sharding_catalog_client.h#L174&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CatalogCache::getAllShardedCollectionsForDb&lt;/a&gt;&#160; to get all its sharded collections.&lt;/p&gt;

&lt;p&gt;3) For each sharded collection, use &lt;a href=&quot;https://github.com/mongodb/mongo/blob/22922911b7c8fc8acf3adabcf4c13b80e5e3595d/src/mongo/s/catalog_cache.h#L189&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CatalogCache::getShardedCollectionRoutingInfoWithRefresh&lt;/a&gt; to load the routing info for that collection.&lt;/p&gt;

&lt;p&gt;This logic can be placed &#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/22922911b7c8fc8acf3adabcf4c13b80e5e3595d/src/mongo/s/server.cpp#L414-L422&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; in sharding initialization on mongos, which occurs &lt;a href=&quot;https://github.com/mongodb/mongo/blob/22922911b7c8fc8acf3adabcf4c13b80e5e3595d/src/mongo/s/server.cpp#L547&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;synchronously during mongos startup&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Test that the logic works by starting up a mongos and asserting on &lt;a href=&quot;https://github.com/mongodb/mongo/blob/22922911b7c8fc8acf3adabcf4c13b80e5e3595d/src/mongo/s/catalog_cache.h#L379&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CatalogCache::Stats::countFullRefreshesStarted&lt;/a&gt;, which is returned &lt;a href=&quot;https://github.com/mongodb/mongo/blob/22922911b7c8fc8acf3adabcf4c13b80e5e3595d/src/mongo/db/s/sharding_server_status.cpp#L113&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;by serverStatus&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="968730">SERVER-43985</key>
            <summary>Make mongos pre-cache the routing table on startup</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="9">Done</resolution>
                                        <assignee username="anton.oyung@mongodb.com">Anton Oyung</assignee>
                                    <reporter username="esha.maharishi@mongodb.com">Esha Maharishi</reporter>
                        <labels>
                            <label>jason-carey-upgrade</label>
                    </labels>
                <created>Mon, 14 Oct 2019 13:29:57 +0000</created>
                <updated>Thu, 16 Mar 2023 12:02:07 +0000</updated>
                            <resolved>Mon, 28 Oct 2019 15:54:14 +0000</resolved>
                                                    <fixVersion>4.3.1</fixVersion>
                    <fixVersion>4.2.18</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="4109550" author="xgen-internal-githook" created="Thu, 7 Oct 2021 07:09:55 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anton Oyung&apos;, &apos;email&apos;: &apos;anton.oyung@mongodb.com&apos;, &apos;username&apos;: &apos;AntonOyung&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43985&quot; title=&quot;Make mongos pre-cache the routing table on startup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43985&quot;&gt;&lt;del&gt;SERVER-43985&lt;/del&gt;&lt;/a&gt; Make mongos pre-cache the routing table on startup&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1fd7913b67d45874f1fde8f6297f4adf618e3d34&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1fd7913b67d45874f1fde8f6297f4adf618e3d34&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2505118" author="xgen-internal-githook" created="Mon, 28 Oct 2019 16:38:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anton Oyung&apos;, &apos;username&apos;: &apos;AntonOyung&apos;, &apos;email&apos;: &apos;anton.oyung@mongodb.com&apos;}
&lt;p&gt;Message: &#8220;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43985&quot; title=&quot;Make mongos pre-cache the routing table on startup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43985&quot;&gt;&lt;del&gt;SERVER-43985&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/349d3c84887940964083dfac2d9ffd36122771b5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/349d3c84887940964083dfac2d9ffd36122771b5&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1295438">SERVER-47169</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1948251">SERVER-62036</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16775"><![CDATA[v4.2]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000xjtliQAA]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 25 Oct 2019 19:15:18 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 17 weeks, 6 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1626</customfieldvalue>
                        </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_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 17 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>anton.oyung@mongodb.com</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hvxce7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvlu13:</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="3306">Sharding 2019-10-21</customfieldvalue>
    <customfieldvalue id="3307">Sharding 2019-11-04</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|hvwynj:</customfieldvalue>

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