<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:23:53 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-10720] Add a way for getShardVersion on mongos to return the full cached chunk distribution for a collection</title>
                <link>https://jira.mongodb.org/browse/SERVER-10720</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, the&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/3a23860614f2d4b69381a561f5c39ec797920a58/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp#L49&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongos version of getShardVersion&lt;/a&gt; (which returns mongos&apos;s&#160;&lt;b&gt;routing&lt;/b&gt; table cache entry for a collection or a database) &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3a23860614f2d4b69381a561f5c39ec797920a58/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp#L115&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;returns&lt;/a&gt; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3a23860614f2d4b69381a561f5c39ec797920a58/src/mongo/s/chunk_manager.h#L284&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the&lt;/a&gt; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3a23860614f2d4b69381a561f5c39ec797920a58/src/mongo/s/chunk_manager.h#L120&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;collection version&lt;/a&gt; (the highest version of any chunk in the collection out of the chunks present in the cache entry) and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3a23860614f2d4b69381a561f5c39ec797920a58/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp#L112&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;logs the chunks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It is much more useful for the command to return the chunks (instead of only logging them), similarly to how the&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/3a23860614f2d4b69381a561f5c39ec797920a58/src/mongo/db/s/get_shard_version_command.cpp#L55&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;shard version of getShardVersion&lt;/a&gt; (which returns the shard&apos;s &lt;b&gt;filtering&lt;/b&gt; table entry for a collection) &lt;a href=&quot;https://github.com/mongodb/mongo/blob/3a23860614f2d4b69381a561f5c39ec797920a58/src/mongo/db/s/get_shard_version_command.cpp#L129-L143&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;does&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="89080">SERVER-10720</key>
            <summary>Add a way for getShardVersion on mongos to return the full cached chunk distribution for a collection</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="cheahuychou.mao@mongodb.com">Cheahuychou Mao</assignee>
                                    <reporter username="randolph@mongodb.com">Randolph Tan</reporter>
                        <labels>
                            <label>ShardingSupport</label>
                            <label>neweng</label>
                    </labels>
                <created>Mon, 9 Sep 2013 19:08:07 +0000</created>
                <updated>Thu, 10 Oct 2019 13:44:15 +0000</updated>
                            <resolved>Thu, 10 Oct 2019 13:44:15 +0000</resolved>
                                                    <fixVersion>4.3.1</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="2475534" author="xgen-internal-githook" created="Thu, 10 Oct 2019 13:42:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;cheahuychou&apos;, &apos;email&apos;: &apos;cheahuychou.mao@mongodb.com&apos;, &apos;name&apos;: &apos;Cheahuychou Mao&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-10720&quot; title=&quot;Add a way for getShardVersion on mongos to return the full cached chunk distribution for a collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-10720&quot;&gt;&lt;del&gt;SERVER-10720&lt;/del&gt;&lt;/a&gt; Add a way for getShardVersion on mongos to return the full cached chunk distribution for a collection&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/0efcbe92a9888c684472439844822e7e98885802&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/0efcbe92a9888c684472439844822e7e98885802&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2464106" author="esha.maharishi@10gen.com" created="Thu, 3 Oct 2019 18:06:00 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev&quot;&gt;kaloian.manassiev&lt;/a&gt; Ok, cool, we&apos;ll give it a try.&lt;/p&gt;</comment>
                            <comment id="2463050" author="kaloian.manassiev" created="Thu, 3 Oct 2019 12:55:31 +0000"  >&lt;p&gt;Yeah, we could do that. It looks like the BSONObjBuilder class also already has a method called &lt;tt&gt;len()&lt;/tt&gt;, which can be used to get the size accumulated so far.&lt;/p&gt;</comment>
                            <comment id="2463034" author="esha.maharishi@10gen.com" created="Thu, 3 Oct 2019 12:44:48 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev&quot;&gt;kaloian.manassiev&lt;/a&gt;, hm, good point. It looks like that can already happen in the shard&apos;s getShardVersion, since if &apos;fullMetadata: true&apos; is passed, then it &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7f7545b75fdec5500a66e75b09549bc4d47a3b29/src/mongo/db/s/get_shard_version_command.cpp#L135&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;calls CollectionMetadata::toBSONChunks&lt;/a&gt;, which &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7f7545b75fdec5500a66e75b09549bc4d47a3b29/src/mongo/db/s/collection_metadata.cpp#L214-L221&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;tries to append all the chunks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Do you think we could fix both commands by having them attempt to return the chunks if they fit in 16MB, using some &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7f7545b75fdec5500a66e75b09549bc4d47a3b29/src/mongo/s/write_ops/batch_write_op.cpp#L149-L152&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;comparison like we do in the write path&lt;/a&gt;? We could also make the shard&apos;s getShardVersion log the chunks if they don&apos;t fit in 16MB. Let me know if you think this is worth doing.&lt;/p&gt;</comment>
                            <comment id="2460857" author="kaloian.manassiev" created="Thu, 3 Oct 2019 08:45:27 +0000"  >&lt;p&gt;I believe the original reason the command logs is that the size of the routing table is unbounded, but the &lt;tt&gt;getShardVersion&lt;/tt&gt; command doesn&apos;t return a cursor and is limited by the max BSON size of 16MB. I don&apos;t think it is a good idea to change that behaviour, because if someone has more than 16MB of chunks, the command will not be useful (although it&apos;s not that useful in the first place to look at 16MB of chunks anyways).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="84474">SERVER-10410</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="707268">DOCS-12521</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>5.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_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 3 Oct 2019 08:45:27 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></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>cheahuychou.mao@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 17 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>cheahuychou.mao@mongodb.com</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmhcv:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6435</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>

                        </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|hspbon:</customfieldvalue>

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