<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:51:09 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-39141] The range deleter should retry on write conflict exceptions</title>
                <link>https://jira.mongodb.org/browse/SERVER-39141</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The range deleter deletes orphan documents by constructing a PlanExecutor with a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/dfd854a68896a8c329bc9d86a23ebf95c6fbd582/src/mongo/db/s/collection_range_deleter.cpp#L402-L410&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;YIELD_MANUAL&lt;/tt&gt; yield policy&lt;/a&gt;. Because of this, any write conflict errors encountered &lt;a href=&quot;https://github.com/mongodb/mongo/blob/dfd854a68896a8c329bc9d86a23ebf95c6fbd582/src/mongo/db/query/plan_executor_impl.cpp#L599-L601&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;will be re-thrown&lt;/a&gt;, but there is no &lt;tt&gt;WriteConflictRetry&lt;/tt&gt; loop in &lt;tt&gt;CollectionRangeDeleter::cleanUpNextRange&lt;/tt&gt;, causing post-migration orphan cleanup and &lt;tt&gt;cleanupOrphaned&lt;/tt&gt;&#160;commands to fail unnecessarily.&lt;/p&gt;

&lt;p&gt;The net effect of this is that more orphans remain on the system.&lt;/p&gt;</description>
                <environment></environment>
        <key id="676246">SERVER-39141</key>
            <summary>The range deleter should retry on write conflict exceptions</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="alex.taskov@mongodb.com">Alexander Taskov</assignee>
                                    <reporter username="jack.mulrow@mongodb.com">Jack Mulrow</reporter>
                        <labels>
                            <label>open_todo_in_code</label>
                            <label>todo_in_code</label>
                    </labels>
                <created>Tue, 22 Jan 2019 22:49:31 +0000</created>
                <updated>Sun, 29 Oct 2023 22:24:52 +0000</updated>
                            <resolved>Mon, 10 Jun 2019 22:30:00 +0000</resolved>
                                                    <fixVersion>4.2.0-rc3</fixVersion>
                    <fixVersion>4.3.1</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="2875388" author="xgen-internal-githook" created="Thu, 13 Feb 2020 00:21:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;alextaskov&apos;, &apos;name&apos;: &apos;Alex Taskov&apos;, &apos;email&apos;: &apos;alex.taskov@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-43518&quot; title=&quot;Complete TODO listed in SERVER-39141&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-43518&quot;&gt;&lt;del&gt;SERVER-43518&lt;/del&gt;&lt;/a&gt; Complete TODO listed in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39141&quot; title=&quot;The range deleter should retry on write conflict exceptions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39141&quot;&gt;&lt;del&gt;SERVER-39141&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/66002c604a9a2cd9c419bad318db0252f576dbd8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/66002c604a9a2cd9c419bad318db0252f576dbd8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2278670" author="xgen-internal-githook" created="Mon, 10 Jun 2019 22:26:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Alex Taskov&apos;, &apos;email&apos;: &apos;alex.taskov@mongodb.com&apos;, &apos;username&apos;: &apos;alextaskov&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39141&quot; title=&quot;The range deleter should retry on write conflict exceptions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39141&quot;&gt;&lt;del&gt;SERVER-39141&lt;/del&gt;&lt;/a&gt; Handle WriteConflictException in range deleter&lt;/p&gt;

&lt;p&gt;(cherry picked from commit ece39c7650b76a45ee2357dc4a7adb2ab195eda4)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ba4d91f29e8fddb7c71ffdcaa3e73aec67511f36&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ba4d91f29e8fddb7c71ffdcaa3e73aec67511f36&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2278594" author="xgen-internal-githook" created="Mon, 10 Jun 2019 21:46:23 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Alex Taskov&apos;, &apos;email&apos;: &apos;alex.taskov@mongodb.com&apos;, &apos;username&apos;: &apos;alextaskov&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39141&quot; title=&quot;The range deleter should retry on write conflict exceptions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39141&quot;&gt;&lt;del&gt;SERVER-39141&lt;/del&gt;&lt;/a&gt; Handle WriteConflictException in range deleter&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ece39c7650b76a45ee2357dc4a7adb2ab195eda4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ece39c7650b76a45ee2357dc4a7adb2ab195eda4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2137083" author="kaloian.manassiev" created="Mon, 4 Feb 2019 19:05:56 +0000"  >&lt;p&gt;Ah, that makes sense, thanks Jack! I removed the 3.6 and 4.0 links.&lt;/p&gt;</comment>
                            <comment id="2137065" author="jack.mulrow" created="Mon, 4 Feb 2019 18:59:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kaloian.manassiev&quot; class=&quot;user-hover&quot; rel=&quot;kaloian.manassiev&quot;&gt;kaloian.manassiev&lt;/a&gt;, I&apos;m not sure this affects 4.0 and 3.6. On both of those branches it looks like the deletes are in a WriteConflictRetryLoop: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.0.5/src/mongo/db/s/collection_range_deleter.cpp#L381-L388&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;4.0&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r3.6.10/src/mongo/db/s/collection_range_deleter.cpp#L404-L411&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;3.6&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38179&quot; title=&quot;range deleter must be prepared for document to be deleted from under it&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38179&quot;&gt;&lt;del&gt;SERVER-38179&lt;/del&gt;&lt;/a&gt; recently changed how the range deleter deletes orphans (removing the retry loop in favor of using &lt;tt&gt;InternalPlanner::deleteWithIndexScan&lt;/tt&gt;), so I think this is only a problem in master.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="671627">SERVER-38972</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="935637">SERVER-43518</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>5.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16775"><![CDATA[v4.2]]></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, 4 Feb 2019 19:05:56 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years 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_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>
                            4 years 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>alex.taskov@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jack.mulrow@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hujy1j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr7mun:</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="2787">Sharding 2019-02-25</customfieldvalue>
    <customfieldvalue id="2967">Sharding 2019-06-03</customfieldvalue>
    <customfieldvalue id="3002">Sharding 2019-06-17</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|hujkav:</customfieldvalue>

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