<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:16:12 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-48123] voteCommitIndexBuild() can hang waiting for its lock acquisition to be granted when there is a stronger lock request waiting ahead of it and when the index build is being aborted</title>
                <link>https://jira.mongodb.org/browse/SERVER-48123</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This problem came up in a build failure that resulted in a test timeout on the primary node.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T1&amp;#93;&lt;/span&gt; We have an in-progress two-phase index build.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T2&amp;#93;&lt;/span&gt; User runs the command to abort the in-progress index build.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T1&amp;#93;&lt;/span&gt; Index build is ready to vote for committing.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T1&amp;#93;&lt;/span&gt; Runs the vote command locally via the DBDirectClient &lt;span class=&quot;error&quot;&gt;&amp;#91;T3&amp;#93;&lt;/span&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T2&amp;#93;&lt;/span&gt; Performs the abort and waits until the index builder thread &lt;span class=&quot;error&quot;&gt;&amp;#91;T1&amp;#93;&lt;/span&gt; receives the signal. Continues holding the exclusive collection lock.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T4&amp;#93;&lt;/span&gt; applyOps command is run that requires the exclusive global lock. The request gets enqueued as &lt;span class=&quot;error&quot;&gt;&amp;#91;T2&amp;#93;&lt;/span&gt; is holding the intent global lock.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T3&amp;#93;&lt;/span&gt; Tries to get the index build entry in the config.system.indexBuilds collection. Requires the intent global lock, its request gets enqueued behind &lt;span class=&quot;error&quot;&gt;&amp;#91;T4&amp;#93;&lt;/span&gt;&apos;s global lock request.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Given this we basically have the following deadlock presenting itself:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T2&amp;#93;&lt;/span&gt; holds the Global IX, Database IX, Collection X locks and is waiting for &lt;span class=&quot;error&quot;&gt;&amp;#91;T1&amp;#93;&lt;/span&gt; to finish so that it can complete aborting the index build.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T1&amp;#93;&lt;/span&gt; is waiting for &lt;span class=&quot;error&quot;&gt;&amp;#91;T3&amp;#93;&lt;/span&gt; to finish voting to commit the index build.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T4&amp;#93;&lt;/span&gt; has a lock request enqueued and is waiting for it (~1.989hrs when the test timed out, Global X). &lt;span class=&quot;error&quot;&gt;&amp;#91;T2&amp;#93;&lt;/span&gt; is preventing this acquisition from going through as it continues to hold its locks.&lt;/li&gt;
	&lt;li&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;T3&amp;#93;&lt;/span&gt; has a lock request enqueued behind &lt;span class=&quot;error&quot;&gt;&amp;#91;T4&amp;#93;&lt;/span&gt;&apos;s request and is waiting for it (~1.989hrs when the test timed out, Global IX).&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1347602">SERVER-48123</key>
            <summary>voteCommitIndexBuild() can hang waiting for its lock acquisition to be granted when there is a stronger lock request waiting ahead of it and when the index build is being aborted</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="13203">Gone away</resolution>
                                        <assignee username="gregory.wlodarek@mongodb.com">Gregory Wlodarek</assignee>
                                    <reporter username="gregory.wlodarek@mongodb.com">Gregory Wlodarek</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 May 2020 03:36:52 +0000</created>
                <updated>Fri, 27 Oct 2023 20:42:14 +0000</updated>
                            <resolved>Mon, 18 May 2020 18:07:04 +0000</resolved>
                                                                    <component>Index Maintenance</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="3093421" author="gregory.wlodarek" created="Mon, 18 May 2020 18:06:30 +0000"  >&lt;p&gt;The change in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48235&quot; title=&quot;The primary node should use the AsyncDBClient to vote for committing the index build to allow the request to be interrupted by the IndexBuildsCoordinator&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48235&quot;&gt;&lt;del&gt;SERVER-48235&lt;/del&gt;&lt;/a&gt; to remove the DBDirectClient when running the &apos;voteCommitIndexBuild&apos; command inadvertently fixes this issue. This is because the abort logic will cancel the AsyncDBClient request &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/index_builds_coordinator.cpp#L933-L935&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here.&lt;/a&gt; Prior to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48235&quot; title=&quot;The primary node should use the AsyncDBClient to vote for committing the index build to allow the request to be interrupted by the IndexBuildsCoordinator&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48235&quot;&gt;&lt;del&gt;SERVER-48235&lt;/del&gt;&lt;/a&gt; we did not cancel the requests started via the DBDirectClient. I will mark this as fixed.&lt;/p&gt;</comment>
                            <comment id="3093408" author="milkie" created="Mon, 18 May 2020 18:02:51 +0000"  >&lt;p&gt;This may have been fixed now&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="1352173">SERVER-48235</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 18 May 2020 18:02:51 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>gregory.wlodarek@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxkrw7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hx3b9r:</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="3877">Execution Team 2020-06-01</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|hxke5j:</customfieldvalue>

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