<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:15:38 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-70235] Don&apos;t create range deletion documents upon v4.2-v4.4 upgrade in case of collection uuid mismatch</title>
                <link>https://jira.mongodb.org/browse/SERVER-70235</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.4.15/src/mongo/db/s/migration_util.cpp#L552-L576&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;upgrade procedure&lt;/a&gt; creates range deletion task documents in the following way: for each local collection, refresh the routing table and - if sharded - create range deletion task documents for all non-owned ranges.&lt;/p&gt;

&lt;p&gt;This procedure does not take into account that no range deletion must happen if the local collection uuid is not matching with the uuid tracked by the config server. This may happen, for example, when a shard holds a stale incarnation of a collection due to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-17397&quot; title=&quot;Dropping a Database or Collection in a Sharded Cluster may not fully succeed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-17397&quot;&gt;&lt;del&gt;SERVER-17397&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Detailed flow&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Since v4.2 is not tracking orphans on disk, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/s/migration_util.cpp#L552-L576&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;submitOrphanRangesForCleanup&lt;/a&gt; is invoked &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/commands/set_feature_compatibility_version_command.cpp#L263&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;by every shard&lt;/a&gt; in order to create range deletion tasks in the following way:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/s/migration_util.cpp#L557&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;for each database&lt;/a&gt;
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/s/migration_util.cpp#L561&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;for each collection&lt;/a&gt; (found in the LOCAL catalog)
		&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
			&lt;li&gt;call &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/s/migration_util.cpp#L569&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;submitOrphanRanges&lt;/a&gt;, that does the following:
			&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
				&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/s/migration_util.cpp#L482&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Get from the config server the routing table&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;if the collection is unsharded --&amp;gt; do nothing&lt;/li&gt;
				&lt;li&gt;else &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/s/migration_util.cpp#L503&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;for each chunk not-owned by the current shard&lt;/a&gt;
				&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
					&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/s/migration_util.cpp#L506-L513&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Create a range deletion task&lt;/a&gt;&lt;/li&gt;
					&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/s/migration_util.cpp#L542&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Persist the range deletion task document&lt;/a&gt;&lt;/li&gt;
				&lt;/ul&gt;
				&lt;/li&gt;
			&lt;/ul&gt;
			&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The problem lies in how a range deletion task document is created: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/s/migration_util.cpp#L508&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the uuid from the local catalog&lt;/a&gt; is persisted rather than the one known by the config server.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2152424">SERVER-70235</key>
            <summary>Don&apos;t create range deletion documents upon v4.2-v4.4 upgrade in case of collection uuid mismatch</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="allison.easton@mongodb.com">Allison Easton</assignee>
                                    <reporter username="pierlauro.sciarelli@mongodb.com">Pierlauro Sciarelli</reporter>
                        <labels>
                            <label>shardingemea-qw</label>
                    </labels>
                <created>Wed, 5 Oct 2022 15:36:39 +0000</created>
                <updated>Sun, 29 Oct 2023 21:32:22 +0000</updated>
                            <resolved>Wed, 9 Nov 2022 10:41:03 +0000</resolved>
                                                    <fixVersion>4.4.19</fixVersion>
                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4966259" author="xgen-internal-githook" created="Wed, 9 Nov 2022 10:39:54 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Allison Easton&apos;, &apos;email&apos;: &apos;allison.easton@mongodb.com&apos;, &apos;username&apos;: &apos;allisoneaston&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-70235&quot; title=&quot;Don&amp;#39;t create range deletion documents upon v4.2-v4.4 upgrade in case of collection uuid mismatch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-70235&quot;&gt;&lt;del&gt;SERVER-70235&lt;/del&gt;&lt;/a&gt; Don&apos;t create range deletion documents upon v4.2-v4.4 upgrade in case of collection uuid mismatch&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/26cf04e6fbfd3c6f37f81028b6f96fa80731bf14&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/26cf04e6fbfd3c6f37f81028b6f96fa80731bf14&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4882065" author="pierlauro.sciarelli" created="Thu, 6 Oct 2022 10:30:50 +0000"  >&lt;p&gt;Done some local testing and realized that &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bc17cf2c788c5dda2801a090ea79da5ff7d5fac9/src/mongo/db/s/migration_util.cpp#L352&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this&lt;/a&gt; prevents the range deletion from actually start.&lt;/p&gt;

&lt;p&gt;Still, it&apos;s erroneous to create range deletion tasks for a different collection, even though in case of catalog inconsistency there are way bigger problems.&lt;/p&gt;

&lt;p&gt;I guess we can flag this as &quot;improvement&quot; or close it as &quot;won&apos;t do&quot;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5006R00001oI4bEQAS]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 6 Oct 2022 10:00:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 13 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 13 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>allison.easton@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</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|i1cxbz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0vlu8:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="6551">Sharding EMEA 2022-10-17</customfieldvalue>
    <customfieldvalue id="6552">Sharding EMEA 2022-10-31</customfieldvalue>
    <customfieldvalue id="6553">Sharding EMEA 2022-11-14</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.5</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|i1cjhb:</customfieldvalue>

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