<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:49:04 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-60142] Shard can migrate on top of orphans after filtering metadata was cleared</title>
                <link>https://jira.mongodb.org/browse/SERVER-60142</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;A migration recipient may start cloning data that overlaps with an ongoing range deletion if the filtering metadata was cleared before starting receiving the migration.&lt;/p&gt;

&lt;p&gt;1. Consider we have an ongoing range deletion (e.g we donated a chunk).&lt;br/&gt;
2. For whatever reason (e.g. a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7a0a6ec04debd09d2f6d14612beb14ce78b93ed1/src/mongo/db/s/shard_filtering_metadata_refresh.cpp#L160&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;failed metadata refresh&lt;/a&gt;), the filtering metadata &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7a0a6ec04debd09d2f6d14612beb14ce78b93ed1/src/mongo/db/s/collection_sharding_runtime.cpp#L223&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;gets cleared&lt;/a&gt;.&lt;br/&gt;
3. Now we start receiving a chunk that overlaps that range deletion (i.e. the same chunk we recently donated away)&lt;br/&gt;
4. MigrationDestinationManager will &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7a0a6ec04debd09d2f6d14612beb14ce78b93ed1/src/mongo/db/s/migration_destination_manager.cpp#L987-L988&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;see that there is an existing overlapping range deletion document&lt;/a&gt;, so it will attempt to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7a0a6ec04debd09d2f6d14612beb14ce78b93ed1/src/mongo/db/s/migration_destination_manager.cpp#L1005-L1006&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;wait for the rangeDeletion task to finish through the CSR&lt;/a&gt;. However, because the metadata was cleared on step (2), the current metadata is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7a0a6ec04debd09d2f6d14612beb14ce78b93ed1/src/mongo/db/s/metadata_manager.cpp#L339&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;not aware&lt;/a&gt; of that range deletion. So &apos;waitForClean&apos; will &lt;a href=&quot;https://github.com/mongodb/mongo/blob/7a0a6ec04debd09d2f6d14612beb14ce78b93ed1/src/mongo/db/s/collection_sharding_runtime.cpp#L268&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;return OK right away&lt;/a&gt;.&lt;br/&gt;
5. So MigrationDestinationManager will begin cloning documents, even though the range deletion is ongoing and may delete them. Thus causing data loss.&lt;/p&gt;

&lt;p&gt;This regression was introduced on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-52906&quot; title=&quot;moveChunk after failed migration that rolled back cloning indexes can hang indefinitely due to missing shard key index&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-52906&quot;&gt;&lt;del&gt;SERVER-52906&lt;/del&gt;&lt;/a&gt; because &lt;a href=&quot;https://github.com/mongodb/mongo/blob/51e25236781f6d0947a27e7432ae17f20317da7b/src/mongo/db/s/migration_destination_manager.cpp#L1003&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this &apos;while&apos;&lt;/a&gt; was &lt;a href=&quot;https://github.com/mongodb/mongo/blob/27d9632d277e63f42752b117ac5e93ac4f0e37a7/src/mongo/db/s/migration_destination_manager.cpp#L987&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;changed to an &apos;if&apos;&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1880589">SERVER-60142</key>
            <summary>Shard can migrate on top of orphans after filtering metadata was cleared</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="jordi.serra-torrens@mongodb.com">Jordi Serra Torrens</assignee>
                                    <reporter username="jordi.serra-torrens@mongodb.com">Jordi Serra Torrens</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Sep 2021 10:06:58 +0000</created>
                <updated>Sun, 29 Oct 2023 21:48:19 +0000</updated>
                            <resolved>Thu, 23 Sep 2021 10:37:59 +0000</resolved>
                                    <version>4.4.8</version>
                    <version>5.0.2</version>
                                    <fixVersion>4.4.10</fixVersion>
                    <fixVersion>5.0.4</fixVersion>
                    <fixVersion>5.1.0-rc0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4106491" author="JIRAUSER1259052" created="Wed, 6 Oct 2021 17:26:25 +0000"  >&lt;p&gt;Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it&#8217;s been triggered. For more active release information, please keep an eye on #server-release. Thank you!&lt;/p&gt;</comment>
                            <comment id="4088953" author="xgen-internal-githook" created="Tue, 28 Sep 2021 13:10:55 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jordi Serra Torrens&apos;, &apos;email&apos;: &apos;jordi.serra-torrens@mongodb.com&apos;, &apos;username&apos;: &apos;jordist&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-60142&quot; title=&quot;Shard can migrate on top of orphans after filtering metadata was cleared&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-60142&quot;&gt;&lt;del&gt;SERVER-60142&lt;/del&gt;&lt;/a&gt; Fix MigrationDestinationManager&apos;s check for overlapping rangeDeletion tasks&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/77e19ae35b3ed0ddcf260103df4d61b53941b27c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/77e19ae35b3ed0ddcf260103df4d61b53941b27c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4080745" author="xgen-internal-githook" created="Thu, 23 Sep 2021 15:11:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jordi Serra Torrens&apos;, &apos;email&apos;: &apos;jordi.serra-torrens@mongodb.com&apos;, &apos;username&apos;: &apos;jordist&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-60142&quot; title=&quot;Shard can migrate on top of orphans after filtering metadata was cleared&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-60142&quot;&gt;&lt;del&gt;SERVER-60142&lt;/del&gt;&lt;/a&gt; Fix MigrationDestinationManager&apos;s check for overlapping rangeDeletion tasks&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/dfff7baa761d2a32ce82f8902659819905bd0a57&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/dfff7baa761d2a32ce82f8902659819905bd0a57&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4079982" author="xgen-internal-githook" created="Thu, 23 Sep 2021 10:33:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jordi Serra Torrens&apos;, &apos;email&apos;: &apos;jordi.serra-torrens@mongodb.com&apos;, &apos;username&apos;: &apos;jordist&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-60142&quot; title=&quot;Shard can migrate on top of orphans after filtering metadata was cleared&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-60142&quot;&gt;&lt;del&gt;SERVER-60142&lt;/del&gt;&lt;/a&gt; Fix MigrationDestinationManager&apos;s check for overlapping rangeDeletion tasks&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/92738c5fa0e8169299e5393e88159b8cbb9559ca&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/92738c5fa0e8169299e5393e88159b8cbb9559ca&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                        <issuelink>
            <issuekey id="2045571">SERVER-66433</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                                                <inwardlinks description="is caused by">
                                        <issuelink>
            <issuekey id="1543779">SERVER-52906</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="21777"><![CDATA[v5.0]]></customfieldvalue>
    <customfieldvalue key="18953"><![CDATA[v4.4]]></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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 22 Sep 2021 13:42:33 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 18 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>
                            2 years, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>74.0</customfieldvalue>

                        </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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jordi.serra-torrens@mongodb.com</customfieldvalue>
            <customfieldvalue>vivian.ge@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i02or3:</customfieldvalue>

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

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