<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:38:34 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>[DOCS-387] FAQ entry for shard balancer prioritizing of chunk migrations and draining</title>
                <link>https://jira.mongodb.org/browse/DOCS-387</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;Scenario:&lt;/p&gt;

&lt;p&gt;A sharded system has uneven chunk distribution. The user removes a shard (setting it to drain) and adds new shards. The balancer prioritizes moving chunks to reach equilibrium before draining the removed shard. This priority is not configurable.&lt;/p&gt;

&lt;p&gt;Two alternative solutions:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Stop the balancer. Write a script to manually move chunks off of the draining shard (using the moveChunk command). Restart the balancer.&lt;/li&gt;
	&lt;li&gt;Set the maxSize on the new shards to some low value so they cannot accept more chunks, which should stop the balancing operation and allow draining to continue (with chunks likely moved to the full shards). Restore the original maxSize value afterwards. When changing maxSize in the config database, you probably need to run the flushRouterConfig command to refresh mongos. Versions of mongos prior to 2.0 won&apos;t support this, so you&apos;d need to restart mongos.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="46768">DOCS-387</key>
            <summary>FAQ entry for shard balancer prioritizing of chunk migrations and draining</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="kay.kim@mongodb.com">Kay Kim</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Thu, 9 Aug 2012 21:39:07 +0000</created>
                <updated>Mon, 13 Nov 2023 17:24:53 +0000</updated>
                            <resolved>Thu, 21 Feb 2013 19:50:27 +0000</resolved>
                                                    <fixVersion>mongodb-2.2</fixVersion>
                    <fixVersion>Server_Docs_20231030</fixVersion>
                    <fixVersion>Server_Docs_20231106</fixVersion>
                    <fixVersion>Server_Docs_20231105</fixVersion>
                    <fixVersion>Server_Docs_20231113</fixVersion>
                                    <component>manual</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="272396" author="auto" created="Thu, 21 Feb 2013 20:02:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2013-02-21T19:54:24Z&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;}
&lt;p&gt;Message: merge: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-387&quot; title=&quot;FAQ entry for shard balancer prioritizing of chunk migrations and draining&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-387&quot;&gt;&lt;del&gt;DOCS-387&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/4206fb04c92895b3fbef4ce72cb46f96103db485&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/4206fb04c92895b3fbef4ce72cb46f96103db485&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="272395" author="auto" created="Thu, 21 Feb 2013 20:02:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2013-02-20T17:39:52Z&apos;, u&apos;name&apos;: u&apos;kay&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-387&quot; title=&quot;FAQ entry for shard balancer prioritizing of chunk migrations and draining&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-387&quot;&gt;&lt;del&gt;DOCS-387&lt;/del&gt;&lt;/a&gt; FAQ entry for shard balancer prioritization&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-387&quot; title=&quot;FAQ entry for shard balancer prioritizing of chunk migrations and draining&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-387&quot;&gt;&lt;del&gt;DOCS-387&lt;/del&gt;&lt;/a&gt; incorporate Jeremy&apos;s comments&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-387&quot; title=&quot;FAQ entry for shard balancer prioritizing of chunk migrations and draining&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-387&quot;&gt;&lt;del&gt;DOCS-387&lt;/del&gt;&lt;/a&gt; balancer and shard drain&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/a3f5a9ab905f01228f9b429ada8eb283a2387642&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/a3f5a9ab905f01228f9b429ada8eb283a2387642&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="272394" author="auto" created="Thu, 21 Feb 2013 20:02:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2013-02-20T17:39:52Z&apos;, u&apos;name&apos;: u&apos;kay&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-387&quot; title=&quot;FAQ entry for shard balancer prioritizing of chunk migrations and draining&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-387&quot;&gt;&lt;del&gt;DOCS-387&lt;/del&gt;&lt;/a&gt; FAQ entry for shard balancer prioritization&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-387&quot; title=&quot;FAQ entry for shard balancer prioritizing of chunk migrations and draining&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-387&quot;&gt;&lt;del&gt;DOCS-387&lt;/del&gt;&lt;/a&gt; incorporate Jeremy&apos;s comments&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-387&quot; title=&quot;FAQ entry for shard balancer prioritizing of chunk migrations and draining&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-387&quot;&gt;&lt;del&gt;DOCS-387&lt;/del&gt;&lt;/a&gt; balancer and shard drain&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/a3f5a9ab905f01228f9b429ada8eb283a2387642&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/a3f5a9ab905f01228f9b429ada8eb283a2387642&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="272393" author="auto" created="Thu, 21 Feb 2013 20:02:02 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2013-02-20T17:39:52Z&apos;, u&apos;name&apos;: u&apos;kay&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-387&quot; title=&quot;FAQ entry for shard balancer prioritizing of chunk migrations and draining&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-387&quot;&gt;&lt;del&gt;DOCS-387&lt;/del&gt;&lt;/a&gt; FAQ entry for shard balancer prioritization&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-387&quot; title=&quot;FAQ entry for shard balancer prioritizing of chunk migrations and draining&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-387&quot;&gt;&lt;del&gt;DOCS-387&lt;/del&gt;&lt;/a&gt; incorporate Jeremy&apos;s comments&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-387&quot; title=&quot;FAQ entry for shard balancer prioritizing of chunk migrations and draining&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-387&quot;&gt;&lt;del&gt;DOCS-387&lt;/del&gt;&lt;/a&gt; balancer and shard drain&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/a3f5a9ab905f01228f9b429ada8eb283a2387642&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/a3f5a9ab905f01228f9b429ada8eb283a2387642&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="163462" author="scotthernandez" created="Wed, 12 Sep 2012 15:08:12 +0000"  >&lt;p&gt;This is not true with 2.2+. The balancer will first remove chunks from the draining shard before general balancing: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/s/balancer_policy.cpp#L210&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/src/mongo/s/balancer_policy.cpp#L210&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With pre-2.2 it will balance first, then move off the draining shard&apos;s chunks.&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/blob/v2.0/s/balancer_policy.cpp#L108&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/v2.0/s/balancer_policy.cpp#L108&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 12 Sep 2012 15:08:12 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 51 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>jmikola@mongodb.com</customfieldvalue>
            <customfieldvalue>kay.kim@mongodb.com</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrsdp3:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5615</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="6">docs-sprint-0</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hryh1b:</customfieldvalue>

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