<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:14:18 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-15976] [Server] Document `mergeAllChunksOnShard` command</title>
                <link>https://jira.mongodb.org/browse/DOCS-15976</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;Starting from v7.0, the &lt;tt&gt;mergeAllChunksOnShard&lt;/tt&gt; command is available on routers.&lt;/p&gt;

&lt;p&gt;The command take care of squashing at once all &quot;mergeable&quot; chunks that a shard owns for a given collection.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Definition or mergeable chunks&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Two or more contiguous non-jumbo chunks belonging to the same collection are going to be considered mergeable when they are owned by the same shard and their history can be safely purged without breaking transactions and snapshot reads.&lt;/p&gt;

&lt;p&gt;Technically, this means that each chunk is required to fulfill the following conditions to be mergeable:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Has never been migrated.&lt;br/&gt;
OR&lt;/li&gt;
	&lt;li&gt;The last migration involving it has happened more than &lt;a href=&quot;https://www.mongodb.com/docs/v5.0/reference/parameters/#mongodb-parameter-param.minSnapshotHistoryWindowInSeconds&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;minSnapshotHistoryWindowInSeconds&lt;/a&gt; ago AND more than &lt;a href=&quot;https://www.mongodb.com/docs/v5.0/reference/parameters/#mongodb-parameter-param.transactionLifetimeLimitSeconds&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;transactionLifetimeLimitSeconds&lt;/a&gt; ago.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Jumbo chunks are not considered mergeable because they cannot participate in migrations.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Parameters of the command&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The command is accepting the following parameters:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;b&gt;shard&lt;/b&gt;: the name of the shard&lt;/li&gt;
	&lt;li&gt;&lt;b&gt;maxNumberOfChunksToMerge&lt;/b&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;optional&amp;#93;&lt;/span&gt;: the maximum number of chunks to merge (this argument can be used in case of a huge number of chunks residing on the same shard for a collection in order not to merge too many chunks in one shot).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;Example&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;NB: the following example assumes that history is empty for all chunks and no chunk is flagged as jumbo, so all contiguous intervals belonging to the same shard are mergeable.&lt;/p&gt;

&lt;p&gt;Let&apos;s considering the following portion of chunks belonging to a collection &lt;em&gt;&lt;b&gt;coll&lt;/b&gt;&lt;/em&gt; with shard key &lt;b&gt;&lt;em&gt;x&lt;/em&gt;&lt;/b&gt;:&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Chunk ID&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;MIN&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;MAX&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;SHARD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;A&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 0&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 10&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;B&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 10&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 20&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;C&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 20&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 30&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;D&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 30&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 40&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;E&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 40&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 50&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;F&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 50&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 60&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;G&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 60&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 70&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;H&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 70&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 80&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;I&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 80&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 90&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;

&lt;ul&gt;
	&lt;li&gt;Invoking &lt;b&gt;&lt;em&gt;coll&lt;/em&gt;.&lt;em&gt;mergeAllChunksOnShard({shard:&lt;/em&gt;&lt;/b&gt; &lt;b&gt;&quot;&lt;em&gt;Shard0&quot;})&lt;/em&gt;&lt;/b&gt; will result in merging the contiguous sequences of chunks A-B-C-D and G-H.&lt;/li&gt;
	&lt;li&gt;Invoking &lt;b&gt;&lt;em&gt;coll&lt;/em&gt;.&lt;em&gt;mergeAllChunksOnShard({shard:&lt;/em&gt;&lt;/b&gt; &lt;b&gt;&quot;&lt;em&gt;Shard1&quot;})&lt;/em&gt;&lt;/b&gt; will result in merging the contiguous sequence of chunks E-F.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The chunks for &lt;b&gt;coll&lt;/b&gt; after invoking the 2 above-mentioned commands will look like this:&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Chunk ID&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;MIN&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;MAX&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;SHARD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;A-B-C-D&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 0&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 40&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;E-F&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 40&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 60&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;G-H&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 60&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 80&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;I&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 80&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;x: 90&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Shard1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</description>
                <environment></environment>
        <key id="2295004">DOCS-15976</key>
            <summary>[Server] Document `mergeAllChunksOnShard` command</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="joseph.dougherty@mongodb.com">Joseph Dougherty</assignee>
                                    <reporter username="pierlauro.sciarelli@mongodb.com">Pierlauro Sciarelli</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Mar 2023 17:02:46 +0000</created>
                <updated>Mon, 13 Nov 2023 17:34:38 +0000</updated>
                            <resolved>Thu, 8 Jun 2023 15:42:45 +0000</resolved>
                                                    <fixVersion>7.0.0-rc0</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></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                            <outwardlinks description="documents">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10620">
                    <name>Issue split</name>
                                                                <inwardlinks description="split from">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2295033">DOCS-15977</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>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_14258" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Baseline start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 1 May 2023 00:00:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 3 May 2023 22:11:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        46 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_14876" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Docs Reviewer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>sarah.olson@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>- Document the auto-merging behavior (DOCS)&lt;br/&gt;
- Deprecate auto-split related commands (DOCS + Shell)</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DOCSP-26284</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>
                            46 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>joseph.dougherty@mongodb.com</customfieldvalue>
            <customfieldvalue>pierlauro.sciarelli@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i21bvr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1joug:</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_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|i20y13:</customfieldvalue>

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