<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:27: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-74501] Fix MigrationBatchFetcher/Inserter completion reliance to not spawn an extra cleanup thread</title>
                <link>https://jira.mongodb.org/browse/SERVER-74501</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Doesn&apos;t impact clusters that have the _SecondaryThrottle turned off or have the balancer off.&lt;/p&gt;

&lt;p&gt;MigrationBatchFetcher&apos;s&#160; &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/s/migration_batch_fetcher.cpp#L213&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;destructor&lt;/a&gt; depends on calling inserterWorkerThreadPool shutdown/join to drain all the scheduled jobs and join on the threadPool spawns another extra thread to drain it.&lt;/p&gt;

&lt;p&gt;Also, secondaryThrottle is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/s/migration_batch_inserter.cpp#L175&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;disabled &lt;/a&gt; for a chunkMigrationConcurrency of more than 1 because of how sessions are checked out/in.&#160;&lt;/p&gt;

&lt;p&gt;When the MigrationBatchFetcher calls join on the inserterThreadPool and there are more jobs to process in the pool, it can spawn an extra thread to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/r5.0.15/src/mongo/util/concurrency/thread_pool.cpp#L318-L332&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;drain&lt;/a&gt; the pool. So now, although the threadCnt is 1 &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/s/migration_batch_inserter.cpp#L175&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;, 2 threads are competing for secondaryThrottle and the invariant is caused.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Invariant failure string in the log file looked like -&#160;&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;{&quot;t&quot;:\{&quot;$date&quot;:&quot;2023-02-28T19:58:58.693+00:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;F&quot;, &quot;c&quot;:&quot;-&quot;, &quot;id&quot;:23079, &quot;ctx&quot;:&quot;ChunkMigrationInserters-1&quot;,&quot;msg&quot;:&quot;Invariant failure&quot;,&quot;attr&quot;:{&quot;expr&quot;:&quot;checkedOutSession&quot;,&quot;file&quot;:&quot;src/mongo/db/session_catalog.cpp&quot;,&quot;line&quot;:302}}&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;


&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;ins&gt;&lt;b&gt;Workaround&lt;/b&gt;&lt;/ins&gt;&lt;/p&gt;

&lt;p&gt;Either one of the following would work&lt;/p&gt;

&lt;p&gt;1. Turn the balancer off&lt;/p&gt;

&lt;p&gt;2. Turn the secondaryThrottle off(with the balancer still running).&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2278636">SERVER-74501</key>
            <summary>Fix MigrationBatchFetcher/Inserter completion reliance to not spawn an extra cleanup thread</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="randolph@mongodb.com">Randolph Tan</assignee>
                                    <reporter username="rachita.dhawan@mongodb.com">Rachita Dhawan</reporter>
                        <labels>
                            <label>RDY</label>
                    </labels>
                <created>Wed, 1 Mar 2023 17:56:08 +0000</created>
                <updated>Sun, 29 Oct 2023 21:25:30 +0000</updated>
                            <resolved>Mon, 20 Mar 2023 16:54:28 +0000</resolved>
                                    <version>5.0.15</version>
                    <version>6.3.0-rc0</version>
                                    <fixVersion>7.0.0-rc0</fixVersion>
                    <fixVersion>6.3.0-rc1</fixVersion>
                    <fixVersion>5.0.16</fixVersion>
                    <fixVersion>6.0.6</fixVersion>
                                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="5285254" author="xgen-internal-githook" created="Mon, 20 Mar 2023 15:50:46 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Randolph Tan&apos;, &apos;email&apos;: &apos;randolph@10gen.com&apos;, &apos;username&apos;: &apos;renctan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-74501&quot; title=&quot;Fix MigrationBatchFetcher/Inserter completion reliance to not spawn an extra cleanup thread&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-74501&quot;&gt;&lt;del&gt;SERVER-74501&lt;/del&gt;&lt;/a&gt; Fix MigrationBatchFetcher/Inserter completion reliance to not spawn an extra cleanup thread&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bf4b3ae9b3eb5c376201135155ef6738bfef0e20)&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/033418d940372570b12ec4233946e9675fc05226&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/033418d940372570b12ec4233946e9675fc05226&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5256815" author="xgen-internal-githook" created="Tue, 7 Mar 2023 21:18:25 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Randolph Tan&apos;, &apos;email&apos;: &apos;randolph@10gen.com&apos;, &apos;username&apos;: &apos;renctan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-74501&quot; title=&quot;Fix MigrationBatchFetcher/Inserter completion reliance to not spawn an extra cleanup thread&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-74501&quot;&gt;&lt;del&gt;SERVER-74501&lt;/del&gt;&lt;/a&gt; Fix MigrationBatchFetcher/Inserter completion reliance to not spawn an extra cleanup thread&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bf4b3ae9b3eb5c376201135155ef6738bfef0e20)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/84a03cb20852a2dc0247481f7da7a023688bd146&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/84a03cb20852a2dc0247481f7da7a023688bd146&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5253281" author="xgen-internal-githook" created="Mon, 6 Mar 2023 21:54:43 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Randolph Tan&apos;, &apos;email&apos;: &apos;randolph@10gen.com&apos;, &apos;username&apos;: &apos;renctan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-74501&quot; title=&quot;Fix MigrationBatchFetcher/Inserter completion reliance to not spawn an extra cleanup thread&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-74501&quot;&gt;&lt;del&gt;SERVER-74501&lt;/del&gt;&lt;/a&gt; Fix MigrationBatchFetcher/Inserter completion reliance to not spawn an extra cleanup thread&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 00dc7293c5d815e2104b5fe0c9a225332af3dfec)&lt;br/&gt;
Branch: v6.3&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bf4b3ae9b3eb5c376201135155ef6738bfef0e20&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bf4b3ae9b3eb5c376201135155ef6738bfef0e20&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5252655" author="xgen-internal-githook" created="Mon, 6 Mar 2023 18:33:26 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Randolph Tan&apos;, &apos;email&apos;: &apos;randolph@10gen.com&apos;, &apos;username&apos;: &apos;renctan&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-74501&quot; title=&quot;Fix MigrationBatchFetcher/Inserter completion reliance to not spawn an extra cleanup thread&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-74501&quot;&gt;&lt;del&gt;SERVER-74501&lt;/del&gt;&lt;/a&gt; Fix MigrationBatchFetcher/Inserter completion reliance to not spawn an extra cleanup thread&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/00dc7293c5d815e2104b5fe0c9a225332af3dfec&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/00dc7293c5d815e2104b5fe0c9a225332af3dfec&lt;/a&gt;&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="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </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="25376"><![CDATA[v6.3]]></customfieldvalue>
    <customfieldvalue key="23470"><![CDATA[v6.0]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.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[[5006R00001radwXQAQ, 5006R00001rbSrfQAE]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 1 Mar 2023 21:17:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        46 weeks, 2 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_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>
                            46 weeks, 2 days 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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>rachita.dhawan@mongodb.com</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1yfnz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1gu94:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_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|i1y1tb:</customfieldvalue>

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