<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:22: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-30083] Schedule orphan range deletions sooner after migration</title>
                <link>https://jira.mongodb.org/browse/SERVER-30083</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This commit, which was subsequently reverted, caused a test hang in CollectionRangeDeleter::DeleteNotification::waitStatus: &lt;a href=&quot;https://github.com/mongodb/mongo/commit/344bf6e257e1427bc594bacac3f5983c2bdeaacf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/344bf6e257e1427bc594bacac3f5983c2bdeaacf&lt;/a&gt; The hang can be seen in this build &lt;a href=&quot;https://evergreen.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_62_64_bit_slow1_344bf6e257e1427bc594bacac3f5983c2bdeaacf_17_07_07_12_44_23&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://evergreen.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_62_64_bit_slow1_344bf6e257e1427bc594bacac3f5983c2bdeaacf_17_07_07_12_44_23&lt;/a&gt; and in the linked BF-5886. The CollectionRangeDeleter functions called in moveChunk were changed in the above commit. It seems to have unwittingly surfaced a bug.&lt;/p&gt;

&lt;p&gt;The original sequence of range deleter calls was&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;DeleteNotification notification = cleanUpRange()&lt;/li&gt;
	&lt;li&gt;notification.abandon()&lt;/li&gt;
	&lt;li&gt;waitForClean()&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The failed commit did&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;DeleteNotification notification = cleanUpRange()&lt;/li&gt;
	&lt;li&gt;notification.waitStatus()           &amp;lt;-- hangs non-deterministically, though frequent enough to be reproducible&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There&apos;s no corresponding &quot;Finished deleting mr_during_migrate.coll range ....&quot; message after the donor finishes the migration and starts waiting in the hung test logs. And one of the thread dumps has CollectionRangeDeleter::DeleteNotification::waitStatus in it.&lt;/p&gt;</description>
                <environment></environment>
        <key id="402343">SERVER-30083</key>
            <summary>Schedule orphan range deletions sooner after migration</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="nathan.myers">Nathan Myers</assignee>
                                    <reporter username="dianna.hohensee@mongodb.com">Dianna Hohensee</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Jul 2017 21:12:15 +0000</created>
                <updated>Mon, 30 Oct 2023 23:15:20 +0000</updated>
                            <resolved>Thu, 28 Sep 2017 20:33:57 +0000</resolved>
                                                    <fixVersion>3.6.0-rc0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1684501" author="xgen-internal-githook" created="Thu, 28 Sep 2017 17:59:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;nathan.myers@10gen.com&apos;, &apos;name&apos;: &apos;Nathan Myers&apos;, &apos;username&apos;: &apos;nathan-myers-mongo&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30083&quot; title=&quot;Schedule orphan range deletions sooner after migration&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30083&quot;&gt;&lt;del&gt;SERVER-30083&lt;/del&gt;&lt;/a&gt; Schedule range deletions sooner&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/19c025d79ca43cc97d577a11817957e4b1112645&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/19c025d79ca43cc97d577a11817957e4b1112645&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1683785" author="nathan.myers" created="Wed, 27 Sep 2017 21:49:21 +0000"  >&lt;p&gt;The problem occurs when the old metadata is still around (and maps the orphan range) at the time deletion is requested, so instead of scheduling its deletion immediately, we would attach the deletion job to the current metadata.  The solution is to find the newest metadata that might depend on the range (which is the oldest place permissible) and drop it there.  Then, when that metadata expires, the deletions are scheduled right then, not later.&lt;/p&gt;

&lt;p&gt;This would show up in tests that stall waiting for a range deletion to complete.  Those that don&apos;t wait would find it deleted shortly after.&lt;/p&gt;</comment>
                            <comment id="1623920" author="nathan.myers" created="Mon, 17 Jul 2017 18:24:20 +0000"  >&lt;p&gt;Sure enough, if it doesn&apos;t get a refresh, it throws and never gets to the point where it gets stuck. Hmm.&lt;/p&gt;</comment>
                            <comment id="1623822" author="dianna.hohensee" created="Mon, 17 Jul 2017 17:17:22 +0000"  >&lt;p&gt;I didn&apos;t look too closely, but if the MigrationSourceManager returns an error &amp;#8211; like for failing to refresh --, the uassert in move_chunk_command.cpp catches it &lt;a href=&quot;https://github.com/mongodb/mongo/blob/e0136739285c097a7da59ba54d6bcd109bb184b5/src/mongo/db/s/move_chunk_command.cpp#L226&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; andthen we never reach range deletion, no?&lt;/p&gt;</comment>
                            <comment id="1623710" author="nathan.myers" created="Mon, 17 Jul 2017 16:05:09 +0000"  >&lt;p&gt;Studying the code, it appears that MigrationSourceManager:: commitChunkMetadataOnConfig can fail to get a refreshed shard metadata.  After it returns, if you construct a ScopedCollectionMetadata, it might still have the deleted range, and if you hold that stale SCM you will wait forever for the deletion to complete.&lt;/p&gt;</comment>
                            <comment id="1621361" author="dianna.hohensee" created="Thu, 13 Jul 2017 18:40:37 +0000"  >&lt;p&gt;Finally determined that the hang was caused by holding a ScopedCollectionMetadata object while scheduling and waiting to range deletion. The solution was to stop holding it &#8211; it wasn&apos;t necessary, anyway, so it&apos;s probably better not to hold on to it anyway. However, holding that scoped object of the latest metadata should not have held up range deletion of an unused range from an old metadata version: it&apos;s a bug that clean up was never scheduled. I suspect the error is either related to this not evaluating to true for some reason when clean up is first requested, or the ScopedCollectionMetadata destructor code that should schedule cleanup when old metadata is released.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="396027">SERVER-29745</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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 17 Jul 2017 16:05:09 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 19 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_14262" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 26 Sep 2017 00:00:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-256</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>
                            6 years, 19 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>nathan.myers</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htamk7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9qbb:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1727">Sharding 2017-07-31</customfieldvalue>
    <customfieldvalue id="1728">Sharding 2017-08-21</customfieldvalue>
    <customfieldvalue id="1854">Sharding 2017-09-11</customfieldvalue>
    <customfieldvalue id="1891">Sharding 2017-10-02</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14261" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 10 Jul 2017 00:00:00 +0000</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|hta8mv:</customfieldvalue>

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