<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:14:59 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-47699] Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO</title>
                <link>https://jira.mongodb.org/browse/SERVER-47699</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, when deleting batches of documents (default 128) the range deleter only yields manually.  This is different behavior than regular bulk deletes, which yield on time as well.&lt;/p&gt;

&lt;p&gt;The range deleter should also yield on time, making it functionally equivalent to regular bulk deletes.  Failing to do so could result in locks being held and blocking other operations longer than anticipated in a case where range deletion was unexpectedly slow (due to an i/o bottleneck, for example).&lt;/p&gt;</description>
                <environment></environment>
        <key id="1325461">SERVER-47699</key>
            <summary>Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="antonio.fuschetto@mongodb.com">Antonio Fuschetto</assignee>
                                    <reporter username="eric.sommer@mongodb.com">Eric Sommer</reporter>
                        <labels>
                            <label>sharding-wfbf-day</label>
                    </labels>
                <created>Wed, 22 Apr 2020 07:34:46 +0000</created>
                <updated>Sun, 29 Oct 2023 22:09:12 +0000</updated>
                            <resolved>Tue, 27 Apr 2021 14:30:07 +0000</resolved>
                                                    <fixVersion>4.0.25</fixVersion>
                    <fixVersion>4.2.15</fixVersion>
                    <fixVersion>4.4.7</fixVersion>
                    <fixVersion>5.0.0-rc0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>39</watches>
                                                                                                                <comments>
                            <comment id="3765800" author="xgen-internal-githook" created="Tue, 11 May 2021 07:28:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Antonio Fuschetto&apos;, &apos;email&apos;: &apos;antonio.fuschetto@mongodb.com&apos;, &apos;username&apos;: &apos;afuschetto&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47699&quot; title=&quot;Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47699&quot;&gt;&lt;del&gt;SERVER-47699&lt;/del&gt;&lt;/a&gt; Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/540caebed8d24ef156f0222169e8328dcc9d5782&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/540caebed8d24ef156f0222169e8328dcc9d5782&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3755806" author="xgen-internal-githook" created="Wed, 5 May 2021 08:05:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Antonio Fuschetto&apos;, &apos;email&apos;: &apos;antonio.fuschetto@mongodb.com&apos;, &apos;username&apos;: &apos;afuschetto&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47699&quot; title=&quot;Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47699&quot;&gt;&lt;del&gt;SERVER-47699&lt;/del&gt;&lt;/a&gt; Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/8d734fcc69f110c062b94585a2c665206c2b3bbe&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/8d734fcc69f110c062b94585a2c665206c2b3bbe&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3755797" author="xgen-internal-githook" created="Wed, 5 May 2021 08:00:16 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Antonio Fuschetto&apos;, &apos;email&apos;: &apos;antonio.fuschetto@mongodb.com&apos;, &apos;username&apos;: &apos;afuschetto&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47699&quot; title=&quot;Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47699&quot;&gt;&lt;del&gt;SERVER-47699&lt;/del&gt;&lt;/a&gt; Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/778dcc77d9a5c3f2e8463c5b8f9ceafeeeb302b8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/778dcc77d9a5c3f2e8463c5b8f9ceafeeeb302b8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3746283" author="kaloian.manassiev" created="Thu, 29 Apr 2021 12:53:42 +0000"  >&lt;p&gt;Approving backport down to versions 4.4 and 4.2 until we evaluate whether the same correctness reasoning applies for 4.0 as well (the range deleter changed in 4.2 and 4.4).&lt;/p&gt;</comment>
                            <comment id="3740860" author="xgen-internal-githook" created="Tue, 27 Apr 2021 13:02:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Antonio Fuschetto&apos;, &apos;email&apos;: &apos;antonio.fuschetto@mongodb.com&apos;, &apos;username&apos;: &apos;afuschetto&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47699&quot; title=&quot;Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47699&quot;&gt;&lt;del&gt;SERVER-47699&lt;/del&gt;&lt;/a&gt; Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/748b99b1fbbda8e332b6a54867a23361fb59dc67&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/748b99b1fbbda8e332b6a54867a23361fb59dc67&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3739699" author="schwerin" created="Mon, 26 Apr 2021 20:01:52 +0000"  >&lt;p&gt;Requesting consideration for backport to 4.4, 4.2 and 4.0, in case &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; was right that it should be safe to all those branches.&lt;/p&gt;</comment>
                            <comment id="3734832" author="xgen-internal-githook" created="Fri, 23 Apr 2021 07:44:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Antonio Fuschetto&apos;, &apos;email&apos;: &apos;antonio.fuschetto@mongodb.com&apos;, &apos;username&apos;: &apos;afuschetto&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-47699&quot; title=&quot;Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-47699&quot;&gt;&lt;del&gt;SERVER-47699&lt;/del&gt;&lt;/a&gt; Change yield type used by range deleter from YIELD_MANUAL to YIELD_AUTO&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/78fbc00b1b5fbb83f91d634c33f56d53231c13df&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/78fbc00b1b5fbb83f91d634c33f56d53231c13df&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3679595" author="kaloian.manassiev" created="Tue, 23 Mar 2021 16:28:51 +0000"  >&lt;p&gt;After discussion with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schwerin&quot; class=&quot;user-hover&quot; rel=&quot;schwerin&quot;&gt;schwerin&lt;/a&gt;, I believe that this work can actually be simpler that I thought, so I am bringing the ticket up to &apos;Needs Triage&apos; on the EMEA backlog to be done on WFBF day.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Tl;dr:&lt;/b&gt;&lt;br/&gt;
 Since we already have the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6a90653debc601b82b9a6de05ccfd6361fa1c1bb/src/mongo/db/s/migration_destination_manager.cpp#L930&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;tracking of the pending deletions&lt;/a&gt; and only the range deleter removes entries from there, we should be able to add the yielding, because that document is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6a90653debc601b82b9a6de05ccfd6361fa1c1bb/src/mongo/db/s/range_deletion_util.cpp#L501&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;dropped&lt;/a&gt; at the end of the range deletion loop.&lt;/p&gt;

&lt;p&gt;Because of this it is not possible for a chunk to be moved inside the range during yield. So in other words, we can actually just enable auto yielding in 4.4 and master and it will just work.&lt;/p&gt;

&lt;p&gt;For 4.2 and 4.0, the range deleter does similar check against the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c8bca152e617ab9b7ec43f09aef0f0b40e439d4b/src/mongo/db/s/collection_range_deleter.cpp#L127&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;in-memory&lt;/a&gt; metadata and so &lt;a href=&quot;https://github.com/mongodb/mongo/blob/c8bca152e617ab9b7ec43f09aef0f0b40e439d4b/src/mongo/db/s/migration_destination_manager.cpp#L770&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;does&lt;/a&gt; chunk receive, so we should be able to backport that change there as well.&lt;/p&gt;

&lt;p&gt;For both releases, the only thing that&apos;s a bit unclear to me is what happens if a drop happens during the yield. I imagine that the plan executor will get killed and that would cause the loop to retry and discover the drop, but whoever picks-up this work should confirm that.&lt;/p&gt;</comment>
                            <comment id="3635438" author="JIRAUSER1256988" created="Thu, 25 Feb 2021 17:19:00 +0000"  >&lt;p&gt;I wonder if &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-53180&quot; title=&quot;Log each operation that holds a lock for an extended period of time without yielding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-53180&quot;&gt;&lt;del&gt;SERVER-53180&lt;/del&gt;&lt;/a&gt; could not just log when the lock is held for too long, but collect the statistics on what % of time the lock was held for the last period of time, separately for high priority CRUD operations and low priority bulk operations? The next bulk batch should be delayed once the stat shows the allowance is exceeded. &lt;/p&gt;

&lt;p&gt;As was explained in &lt;a href=&quot;https://jira.mongodb.org/browse/HELP-20417?focusedCommentId=3537250&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-3537250&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;comment&lt;/a&gt; in the version 4.2 the range deletion was naively prorated by blocking operations. Making it more asynchronous in 4.4 created a problem. Doing this in async way is still correct, but the rate limiter should prevent the next batch, especially a batch from unrelated range delete, to start too early.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1557106">SERVER-53180</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.4]]></customfieldvalue>
    <customfieldvalue key="16775"><![CDATA[v4.2]]></customfieldvalue>
    <customfieldvalue key="15640"><![CDATA[v4.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[[5002K00000jaECNQA2, 5002K00000r2vBQQAY, 5002K00000qgGJVQA2, 5002K00000s0PPuQAM, 5002K000010Hj1AQAS]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 25 Feb 2021 17:19:00 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew.shuvalov@mongodb.com</customfieldvalue>
            <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>antonio.fuschetto@mongodb.com</customfieldvalue>
            <customfieldvalue>eric.sommer@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</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|hxh2nj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hymniv:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="4497">Sharding 2021-04-05</customfieldvalue>
    <customfieldvalue id="4838">Sharding EMEA 2021-05-03</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|hxgowv:</customfieldvalue>

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