<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:09:06 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-5507] Add sharded per-collection settings (chunksize/balancing/window)</title>
                <link>https://jira.mongodb.org/browse/SERVER-5507</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Not every collection needs to be balanced in the same ways. The maxChunkSize for example will depend on the avg doc size in many cases.&lt;/p&gt;</description>
                <environment></environment>
        <key id="35518">SERVER-5507</key>
            <summary>Add sharded per-collection settings (chunksize/balancing/window)</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="10033" iconUrl="https://jira.mongodb.org/images/icons/statuses/information.png" description="Status for tickets that need to be escalated and unblocked on our team.">Blocked</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-catalog-and-routing">Backlog - Catalog and Routing</assignee>
                                    <reporter username="scotthernandez">Scott Hernandez</reporter>
                        <labels>
                            <label>balancer</label>
                            <label>chunks</label>
                            <label>sharding</label>
                    </labels>
                <created>Thu, 5 Apr 2012 04:38:34 +0000</created>
                <updated>Tue, 16 Jan 2024 14:28:28 +0000</updated>
                                                                            <component>Sharding</component>
                                        <votes>1</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="4169981" author="tommaso.tocci" created="Thu, 4 Nov 2021 18:11:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58270&quot; title=&quot;Create configureCollectionAutoSplitter command &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58270&quot;&gt;&lt;del&gt;SERVER-58270&lt;/del&gt;&lt;/a&gt; introduced a new command configureCollectionAutoSplitter that allows to set per collection max chunk size.&lt;/p&gt;</comment>
                            <comment id="2924051" author="esha.maharishi@10gen.com" created="Mon, 2 Mar 2020 22:16:30 +0000"  >&lt;h1&gt;&lt;a name=&quot;Currentstateoftheworld&quot;&gt;&lt;/a&gt;Current state of the world&lt;/h1&gt;
&lt;h2&gt;&lt;a name=&quot;Globalsettings&quot;&gt;&lt;/a&gt;Global settings&lt;/h2&gt;

&lt;p&gt;The following auto-balancing settings are global (not per namespace), and are stored in three documents in the &lt;tt&gt;config.settings&lt;/tt&gt; collection on the config server:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A document with&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/balancer_configuration.cpp#L83&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_id: &quot;balancer&quot;&lt;/a&gt;, which is described by &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/balancer_configuration.h#L58&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;BalancerSettingsType&lt;/a&gt;, which includes the balancing mode (full, autosplit-only, off), active window, and whether to balance jumbo chunks&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;A document with&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/balancer_configuration.cpp#L86&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_id: &quot;chunksize&quot;&lt;/a&gt;, which is described by &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/balancer_configuration.h#L139&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ChunkSizeSettingsType&lt;/a&gt;, which contains maxChunkSizeBytes&lt;/li&gt;
	&lt;li&gt;A document with&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/balancer_configuration.cpp#L89&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_id: &quot;autosplit&quot;&lt;/a&gt;, which is described by &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/balancer_configuration.h#L179&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;AutoSplitSettingsType&lt;/a&gt;, which contains shouldAutoSplit&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Every cluster node has an in-memory cache of these settings &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/balancer_configuration.h#L306-L311&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;in an instance of BalancerConfiguration&lt;/a&gt;, which lives &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/sharding_initialization.cpp#L216&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;on the Grid&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Mongos&lt;/b&gt; periodically refreshes its BalancerConfiguration &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/sharding_uptime_reporter.cpp#L118&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;under the ShardingUptimeReporter thread&lt;/a&gt;, which is launched &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/server.cpp#L649-L650&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;on mongos startup&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I actually am not sure why mongos needs to know the BalancerConfiguration - &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;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=renctan&quot; class=&quot;user-hover&quot; rel=&quot;renctan&quot;&gt;renctan&lt;/a&gt;, is it unnecessary now that neither autosplitting nor autobalancing are done by mongos?&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Shard&lt;/b&gt; &lt;b&gt;primaries&lt;/b&gt; periodically refresh their BalancerConfiguration &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/s/periodic_balancer_config_refresher.cpp#L61&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;under the PeriodicBalancerConfigRefresher thread&lt;/a&gt;, which is launched &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/s/sharding_initialization_mongod.cpp#L182&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;on sharding initialization&lt;/a&gt;, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/s/periodic_balancer_config_refresher.cpp#L109-L116&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;paused on stepdown&lt;/a&gt;, and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/s/periodic_balancer_config_refresher.cpp#L94-L107&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;resumed on stepup&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On shards, the ShardServerOpObserver calls incrementChunkOnInsertOrUpdate, which checks &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/s/shard_server_op_observer.cpp#L177-L190&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;whether to initiate a split attempt&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Config&lt;/b&gt; &lt;b&gt;servers&lt;/b&gt;&#160; periodically refresh their BalancerConfiguration &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/s/balancer/balancer.cpp#L331&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;under the balancer thread&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On config servers, the balancer thread checks &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/s/balancer/balancer.cpp#L376-L380&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;whether to do a balancing round&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp#L530&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;whether to balance jumbo chunks&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;a name=&quot;Percollectionsettings&quot;&gt;&lt;/a&gt;Per-collection settings&lt;/h2&gt;

&lt;p&gt;Additionally, there is a per-collection setting for whether to allow auto-balancing, which is stored &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/s/catalog/type_collection.h#L208&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;in each entry in config.collections&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Shards&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/s/chunk_splitter.cpp#L205-L215&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;check&lt;/a&gt; this setting to determine whether to opt out of auto-splitting for a specific collection.&lt;/p&gt;

&lt;p&gt;Config servers&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.3.4/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp#L288-L292&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;check&lt;/a&gt; this setting to determine whether to opt out of auto-balancing for a specific collection.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="1101716">SERVER-45630</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="32647">SERVER-5277</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1528835">SERVER-51890</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1695562">SERVER-56464</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26387"><![CDATA[Catalog and Routing]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000dX1OVQA0, 5002K00000lm9MQQAY, 5006R00001ltL05QAE]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 21 Jan 2020 15:20:35 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 13 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<a href='https://jira.mongodb.org/browse/PM-3338'>PM-3338</a>]]></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>connie.chen@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 13 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>backlog-server-catalog-and-routing</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
            <customfieldvalue>tommaso.tocci@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hro747:</customfieldvalue>

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

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

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