<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:07:10 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-13200] Investigate changes in SERVER-42273: Introduce a &quot;force&quot; option to `moveChunk` to allow migrating jumbo chunks</title>
                <link>https://jira.mongodb.org/browse/DOCS-13200</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;h2&gt;&lt;a name=&quot;Description&quot;&gt;&lt;/a&gt;Description&lt;/h2&gt;

    &lt;div class=&quot;panel&quot; style=&quot;background-color: #c2d2c2;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelHeader&quot; style=&quot;border-bottom-width: 1px;background-color: #239eb0;&quot;&gt;&lt;b&gt;Downstream Change Summary&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #c2d2c2;&quot;&gt;
&lt;p&gt;    This ticket changes the behavior of chunk migration such that it is now possible to &#8220;force&#8221; a jumbo chunk to be migrated. There are changes to both the &#8216;moveChunk&#8217; command as well as balancer configuration settings.&lt;/p&gt;

&lt;p&gt;Changes to moveChunk command:&lt;br/&gt;
A new optional boolean parameter &apos;forceJumbo&apos; that defaults to false. If set to true and the chunk would otherwise have been deemed too large to move, the donor shard will enter the critical section early and writes will be blocked during the cloning phase. This is important to note as it can cause a long period of time where ops are blocked on this collection.&lt;/p&gt;

&lt;p&gt;Changes to balancer configuration settings:&lt;br/&gt;
A new field &apos;attemptToBalanceJumboChunks&apos; in the &apos;balancer&apos; document in the config.settings collection. This a boolean field that defaults to false. This document will now look something like &lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&quot;_id&quot;: &quot;balancer&quot;, &quot;mode&quot;: &quot;full&quot;, &quot;stopped&quot;: false, &quot;attemptToBalanceJumboChunks&quot;: false}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;&lt;/p&gt;

&lt;p&gt;If &apos;attemptToBalanceJumboChunks&apos; is set to true, the balancer will schedule migrations that attempt to move large chunks as long as the chunk is &lt;b&gt;not&lt;/b&gt; marked &apos;jumbo&apos; in config.chunks. A chunk is marked &apos;jumbo&apos; only after an attempt to split or move a large chunk has failed because of its size or the size of the transfer mods queue. The balancer should not continually try to schedule the migration of a chunk that has failed for either of these reasons previously to avoid the risk of forever scheduling the same migration. A user can run &apos;clearJumboFlag&apos; so that the balancer with schedule this migration in the future, or they can choose to use the moveChunk command to manually move the chunk.&lt;/p&gt;

&lt;p&gt;Unlike the new behavior of the moveChunk command above, the donor shard will &lt;b&gt;not&lt;/b&gt; enter the critical section early, and if the transfer mods queue (queue of writes that modify any documents being migrated) surpasses 500MB of memory the migration &lt;b&gt;will&lt;/b&gt; fail. This is to avoid unintended &quot;down time&quot; in the case a user was unaware that moving a large chunk can cause a long period of time where ops are blocked on this collection.&lt;/p&gt;

&lt;p&gt;Changes to shard removal:&lt;br/&gt;
If a shard is in draining mode, meaning it has been removed, the balancer will also attempt to schedule migrations of any large chunks currently belonging to this shard. The balancer will behave the same as if &apos;attemptToBalanceJumboChunks&apos; is set to true (described above).&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name=&quot;DescriptionofLinkedTicket&quot;&gt;&lt;/a&gt;Description of Linked Ticket&lt;/h2&gt;
&lt;p&gt;    Currently, if a chunk is larger than &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a5d4ab967af9cbba17e6aa5afadca35927bd74c1/src/mongo/s/balancer_configuration.cpp#L87&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;64MB by default&lt;/a&gt; or &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a5d4ab967af9cbba17e6aa5afadca35927bd74c1/src/mongo/s/balancer_configuration.cpp#L410&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;1GB max&lt;/a&gt;, the balancer will mark it as jumbo and will refuse to move it.&lt;/p&gt;

&lt;p&gt;It is possible to manually issue a &lt;a href=&quot;https://docs.mongodb.com/manual/reference/command/moveChunk/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;moveChunk&lt;/tt&gt;&lt;/a&gt; command and pass the unsupported and undocumented &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a5d4ab967af9cbba17e6aa5afadca35927bd74c1/src/mongo/s/commands/cluster_move_chunk_cmd.cpp#L130&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;maxChunkSizeBytes&lt;/tt&gt;&lt;/a&gt; parameter, which will override the check for max chunk size, but even with this, given sufficient write load to the chunk being migrated, the memory usage on the donor shard could &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a5d4ab967af9cbba17e6aa5afadca35927bd74c1/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp#L366&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;exceed 500MB&lt;/a&gt; in which case migration will still fail.&lt;/p&gt;

&lt;p&gt;This ticket proposes adding a new &lt;tt&gt;forceJumbo&lt;/tt&gt; option to the &lt;tt&gt;moveChunk&lt;/tt&gt; command in order to allow large chunks to be migrated at the possible expense of blocking writes to the owning collection on the shard in question. The option will have the following deviation from the way it currently operates:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;It will skip the step, which &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a5d4ab967af9cbba17e6aa5afadca35927bd74c1/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp#L801&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sorts the cloned chunk&apos;s document ids&lt;/a&gt; and will instead give out the chunks in the order of the shard key (this means it will never return a &apos;jumbo chunk&apos; error)&lt;/li&gt;
	&lt;li&gt;Instead of failing the migration, if the memory usage &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a5d4ab967af9cbba17e6aa5afadca35927bd74c1/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp#L366&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;exceeds 500MB&lt;/a&gt;, it will instead &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a5d4ab967af9cbba17e6aa5afadca35927bd74c1/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp#L296&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;enter the critical section&lt;/a&gt; (this means that writes to the collection being migrated will possibly block for longer period of time)&lt;/li&gt;
&lt;/ol&gt;



&lt;h2&gt;&lt;a name=&quot;Scopeofchanges&quot;&gt;&lt;/a&gt;Scope of changes&lt;/h2&gt;

&lt;h2&gt;&lt;a name=&quot;ImpacttoOtherDocs&quot;&gt;&lt;/a&gt;Impact to Other Docs&lt;/h2&gt;

&lt;h2&gt;&lt;a name=&quot;MVP%28WorkandDate%29&quot;&gt;&lt;/a&gt;MVP (Work and Date)&lt;/h2&gt;

&lt;h2&gt;&lt;a name=&quot;Resources%28ScopeorDesignDocs%2CInvision%2Cetc.%29&quot;&gt;&lt;/a&gt;Resources (Scope or Design Docs, Invision, etc.)&lt;/h2&gt;
</description>
                <environment></environment>
        <key id="990269">DOCS-13200</key>
            <summary>Investigate changes in SERVER-42273: Introduce a &quot;force&quot; option to `moveChunk` to allow migrating jumbo chunks</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="13201">Fixed</resolution>
                                        <assignee username="kay.kim@mongodb.com">Kay Kim</assignee>
                                    <reporter username="backlog-server-pm">Backlog - Core Eng Program Management Team</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Nov 2019 18:20:16 +0000</created>
                <updated>Mon, 13 Nov 2023 18:14:05 +0000</updated>
                            <resolved>Wed, 6 May 2020 16:46:23 +0000</resolved>
                                                    <fixVersion>4.3.1</fixVersion>
                    <fixVersion>Server_Docs_20231030</fixVersion>
                    <fixVersion>Server_Docs_20231106</fixVersion>
                    <fixVersion>Server_Docs_20231105</fixVersion>
                    <fixVersion>Server_Docs_20231113</fixVersion>
                                    <component>manual</component>
                    <component>Server</component>
                        <due>Fri, 24 Apr 2020 00:00:00 +0000</due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3072150" author="xgen-internal-githook" created="Wed, 6 May 2020 16:46:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Kay Kim&apos;, &apos;email&apos;: &apos;kay.kim@10gen.com&apos;, &apos;username&apos;: &apos;kay-kim&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-13200&quot; title=&quot;Investigate changes in SERVER-42273: Introduce a &amp;quot;force&amp;quot; option to `moveChunk` to allow migrating jumbo chunks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-13200&quot;&gt;&lt;del&gt;DOCS-13200&lt;/del&gt;&lt;/a&gt;: 4.4 forceJumbo&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/0c934ca2f9417604cbde4923ef34758a9e4435bc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/0c934ca2f9417604cbde4923ef34758a9e4435bc&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                            <outwardlinks description="documents">
                                        <issuelink>
            <issuekey id="860720">SERVER-42273</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 29 Apr 2020 16:10:06 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 40 weeks 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DOCS-12787</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>emet.ozar@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 40 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-pm</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kay.kim@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hw0ne7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvoyxb:</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="3915">ServerDocs: April20-April24</customfieldvalue>
    <customfieldvalue id="3923">ServerDocs: April27-May01</customfieldvalue>
    <customfieldvalue id="3936">ServerDocs: May04-May08</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|hw09nj:</customfieldvalue>

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