<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:12:48 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-26661] Add option for shardCollection to wait for initial chunks to be balanced</title>
                <link>https://jira.mongodb.org/browse/SERVER-26661</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This is useful for sharding huge collections and the user would want to wait for the collection to be in steady state before inserting new documents.&lt;/p&gt;

&lt;p&gt;Note: for empty collections, the chunks should already be balanced when the shardCollection command returns successfully.&lt;/p&gt;

&lt;p&gt;Original description&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We have had a few users run into problems with querying sharded collection that are being actively balanced. &lt;/p&gt;

&lt;p&gt;With hashed shard keys, the &quot;shardCollection&quot; command will create chunks and distribute them across the shards. Normally, the migration of empty chunks takes little time. We have seen cases where the shards are so overloaded that this migration does not complete before the user application starts inserting documents. Therefore, the application is actively inserting documents into a collection that is being migrated. We have seen that the shards take days or longer to finally balance. &lt;/p&gt;

&lt;p&gt;This situation can lead to strange problems like: &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;failures returned to the client when shard metadata is stale.&lt;/li&gt;
	&lt;li&gt;complete collection balancing never really being achieved&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This situation is made worse by the tendency of some applications to keep creating a logical set of collections, either using a different name or creating new databases. We are not entirely sure why users want to partition a single logical data set into many collections (of the same structure) but this behavior is certainly not unusual. &lt;/p&gt;

&lt;p&gt;Unfortunately, these users often delay optimizing or upgrading their cluster to reduce the load. &lt;/p&gt;

&lt;p&gt;To assist these users, I suggest that we add methods, callable from client applications, &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;to test whether the balancing of a collection is complete (or as complete as it will get).&lt;/li&gt;
	&lt;li&gt;extend the &quot;shardCollection&quot; command adding a boolean argument ( e.g. &quot;waitForBalancing&quot;) to block until the migration of the empty chunks has completed&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;With these, the clients can create new collections, wait for the balancing of the empty chunks, then proceed with inserting documents. &lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="323430">SERVER-26661</key>
            <summary>Add option for shardCollection to wait for initial chunks to be balanced</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="backlog-server-sharding-emea">[DO NOT USE] Backlog - Sharding EMEA</assignee>
                                    <reporter username="steven.hand">Steven Hand</reporter>
                        <labels>
                            <label>chunking</label>
                            <label>etl</label>
                            <label>sharding</label>
                    </labels>
                <created>Thu, 13 Oct 2016 15:30:08 +0000</created>
                <updated>Tue, 6 Dec 2022 04:13:57 +0000</updated>
                            <resolved>Mon, 15 Nov 2021 15:13:24 +0000</resolved>
                                                    <fixVersion>features we&amp;#39;re not sure of</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="4188938" author="kaloian.manassiev" created="Mon, 15 Nov 2021 15:13:05 +0000"  >&lt;p&gt;Most of the requests in this ticket have been done under &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43990&quot; title=&quot;A command to confirm that all chunks have been moved to the right zone after the initial split&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43990&quot;&gt;&lt;del&gt;SERVER-43990&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1414512" author="steven.hand" created="Fri, 21 Oct 2016 14:21:54 +0000"  >&lt;p&gt;Of course they could query the config database collections directly. Regardless, of how the data is collected, without the proposed change, the customer would have to calculate when the collection is balanced in order to avoid the adverse side-effects in this scenario. &lt;/p&gt;</comment>
                            <comment id="1407723" author="asya" created="Thu, 13 Oct 2016 18:03:34 +0000"  >&lt;p&gt;are they doing &quot;shardCollection&quot; and giving it some huge number of chunks?  If so why?  They shouldn&apos;t be.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25133"><![CDATA[Sharding EMEA]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 13 Oct 2016 18:03:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 12 weeks, 2 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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 12 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-sharding-emea</customfieldvalue>
            <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>steven.hand</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjt7j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrbndj:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1315">Sharding 2016-12-12</customfieldvalue>
    <customfieldvalue id="1316">Sharding 2017-01-02</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|hrq4yn:</customfieldvalue>

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