<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:17:55 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-28363] When shard empty collection I have noticed that ChunkManager loads chunks for every other sharded collection in the database</title>
                <link>https://jira.mongodb.org/browse/SERVER-28363</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I was investigating an issue whereby creating a new collection was taking around 100 seconds.  When I looked at the mongos logs I noticed that there was message of following type for every sharded collection in the database:&lt;/p&gt;

&lt;p&gt;ChunkManager: time to load chunks for ddp_rel.timeseries.58c142b39340386c4d618779: 249ms sequenceNumber: 12117 version: 3|1||58c142b72810c82e0b145d5f based on: (empty)&lt;/p&gt;

&lt;p&gt;(I have attached log).&lt;/p&gt;

&lt;p&gt;After investigating I realised that my shard tag was incorrect because it only had the collection name and not the full namespace including the database name.&lt;/p&gt;

&lt;p&gt;After that, it worked better as each ChunkManager statement was taking 1ms.  However, I am concerned that if we have &amp;gt; 10,000 collections (which is quite feasible as this is a time series database with collection per time series) it will still take a long time.&lt;/p&gt;

&lt;p&gt;Can someone explain to me why this is happening?  It states &quot;based on: (empty)&quot; but I did testing by loading dummy data, and it still happens even if the sharded collection is not empty.&lt;/p&gt;

&lt;p&gt;Any explanation would be greatly appreciated, and if possible a way to prevent this happening.&lt;/p&gt;

&lt;p&gt;As FYI, we use sharded tags so that the data is pinned to location and shard.&lt;/p&gt;</description>
                <environment></environment>
        <key id="365625">SERVER-28363</key>
            <summary>When shard empty collection I have noticed that ChunkManager loads chunks for every other sharded collection in the database</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="mark.agarunov">Mark Agarunov</assignee>
                                    <reporter username="EvilChill">Clive Hill</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 Mar 2017 09:51:40 +0000</created>
                <updated>Tue, 31 Oct 2017 19:24:13 +0000</updated>
                            <resolved>Wed, 22 Mar 2017 13:13:45 +0000</resolved>
                                    <version>3.2.4</version>
                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="1542425" author="ramon.fernandez" created="Thu, 6 Apr 2017 13:11:25 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=EvilChill&quot; class=&quot;user-hover&quot; rel=&quot;EvilChill&quot;&gt;EvilChill&lt;/a&gt;, please see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22611?focusedCommentId=1542420&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1542420&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;my comment&lt;/a&gt; on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22611&quot; title=&quot;ChunkManager refresh can occasionally cause a full reload&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22611&quot;&gt;&lt;del&gt;SERVER-22611&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                            <comment id="1542383" author="evilchill" created="Thu, 6 Apr 2017 12:21:58 +0000"  >&lt;p&gt;This: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22611&quot; title=&quot;ChunkManager refresh can occasionally cause a full reload&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22611&quot;&gt;&lt;del&gt;SERVER-22611&lt;/del&gt;&lt;/a&gt; states it affects version 3.4.2.  Surely it is available in 3.4.3 as well?&lt;/p&gt;

&lt;p&gt;Are there any other steps other than upgrading that need to be done?&lt;/p&gt;</comment>
                            <comment id="1542382" author="evilchill" created="Thu, 6 Apr 2017 12:20:06 +0000"  >&lt;p&gt;Hi Kal,&lt;/p&gt;

&lt;p&gt;I upgraded to MongoDb 3.4.3, and updated the Java driver to 3.4.2 today and tested with sharded collection, and I am still seeing the behavior.&lt;/p&gt;

&lt;p&gt;I&apos;ve just re-read your comment &quot;*plan *backports to 3.4&quot;.&lt;/p&gt;

&lt;p&gt;Can you advise as to when this will be done?&lt;/p&gt;

&lt;p&gt;Best regards,&lt;/p&gt;

&lt;p&gt;Clive&lt;/p&gt;</comment>
                            <comment id="1530145" author="kaloian.manassiev" created="Wed, 22 Mar 2017 12:25:23 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=EvilChill&quot; class=&quot;user-hover&quot; rel=&quot;EvilChill&quot;&gt;EvilChill&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;The behaviour you are experiencing is one of the side effects of the metadata cache refresh bug described in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22611&quot; title=&quot;ChunkManager refresh can occasionally cause a full reload&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22611&quot;&gt;&lt;del&gt;SERVER-22611&lt;/del&gt;&lt;/a&gt;. Because of this bug, whenever you shard a new collection, it fully reloads the metadata cache for all other collections.&lt;/p&gt;

&lt;p&gt;We have fixed it in master and plan backports to 3.4. Please watch &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22611&quot; title=&quot;ChunkManager refresh can occasionally cause a full reload&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22611&quot;&gt;&lt;del&gt;SERVER-22611&lt;/del&gt;&lt;/a&gt; for more information.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br/&gt;
-Kal.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="265425">SERVER-22611</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="151790" name="LogsForShardCollectionOnNew_ddp_rel_timesreis3.txt" size="176776" author="EvilChill" created="Fri, 17 Mar 2017 09:46:33 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 21 Mar 2017 23:48:35 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 44 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_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>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 44 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>EvilChill</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>mark.agarunov</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht4e07:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hswuwn:</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_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|hs4e8n:</customfieldvalue>

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