<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:22:30 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-50381] 3 way deadlock between applyOps cmd, prepared transaction and secondary oplog fetcher initiated find command</title>
                <link>https://jira.mongodb.org/browse/SERVER-50381</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;3 way deadlock involving applyOps cmd, prepared transaction and oplog find command&#160; can occur on a primary.&lt;br/&gt;
 1)&#160;&lt;tt&gt;applyOps&lt;/tt&gt;&#160;cmd&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/1379397270f507e2649fce1205beb69dd605c74d/src/mongo/db/repl/apply_ops.cpp#L407&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;enqueues&lt;/a&gt;&#160;global lock in X mode and stuck behind prepared transaction due to global lock conflict.&lt;br/&gt;
 2) Prepared transaction holding global lock in IX mode, waits for the&#160;&lt;tt&gt;prepareTransaction&lt;/tt&gt;&#160;oplog entry to be majority replicated. But stuck behind the Secondaries oplog replication.&lt;br/&gt;
 3) Secondary oplog fetcher initiated&#160;&lt;tt&gt;find&lt;/tt&gt;&#160;cmd on oplog collection is waiting for global lock to acquire in IS mode but stuck behind the applyOps cmd due to enqueued global lock .&lt;/p&gt;

&lt;p&gt;To be noted, &apos;&lt;tt&gt;applyOps&lt;/tt&gt;&apos; cmd by&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/1379397270f507e2649fce1205beb69dd605c74d/src/mongo/db/repl/apply_ops.idl#L48-L51&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;default&lt;/a&gt;&#160;runs in atomic mode. Atomic mode apply ops consisting of CRUD ops always take global lock in&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/1379397270f507e2649fce1205beb69dd605c74d/src/mongo/db/repl/apply_ops.cpp#L407&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;X&lt;/a&gt;&#160;mode.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1446365">SERVER-50381</key>
            <summary>3 way deadlock between applyOps cmd, prepared transaction and secondary oplog fetcher initiated find command</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="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="suganthi.mani@mongodb.com">Suganthi Mani</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Aug 2020 14:28:41 +0000</created>
                <updated>Fri, 27 Oct 2023 20:46:28 +0000</updated>
                            <resolved>Fri, 11 Nov 2022 21:46:38 +0000</resolved>
                                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="4975749" author="judah.schvimer" created="Fri, 11 Nov 2022 21:46:39 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33182&quot; title=&quot;Remove atomic applyOps&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33182&quot;&gt;&lt;del&gt;SERVER-33182&lt;/del&gt;&lt;/a&gt; made this issue go away.&lt;/p&gt;</comment>
                            <comment id="3696998" author="judah.schvimer" created="Thu, 1 Apr 2021 18:18:08 +0000"  >&lt;p&gt;This is lower priority now that &lt;tt&gt;applyOps&lt;/tt&gt; is behind a special privilege (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36263&quot; title=&quot;Bypassing operation validation in applyOps should require special privilege&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36263&quot;&gt;&lt;del&gt;SERVER-36263&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;</comment>
                            <comment id="3359657" author="kaloian.manassiev" created="Wed, 26 Aug 2020 06:07:54 +0000"  >&lt;p&gt;Callers in Sharding still use &lt;tt&gt;applyOps&lt;/tt&gt;, yes - specifically move/split and merge. These operations definitely don&apos;t need the global X-lock, though if you want to relax that. They don&apos;t need strong locking at all.&lt;/p&gt;</comment>
                            <comment id="3347417" author="suganthi.mani" created="Wed, 19 Aug 2020 16:10:06 +0000"  >&lt;p&gt;Tagging &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&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; to throw more lights from shading perspective.&lt;/p&gt;</comment>
                            <comment id="3347382" author="schwerin" created="Wed, 19 Aug 2020 15:54:06 +0000"  >&lt;p&gt;Does &lt;tt&gt;applyOps&lt;/tt&gt; still require the global X lock? Do its callers in sharding depend on it?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="494168">SERVER-33182</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="497859">SERVER-33326</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="575778">SERVER-36263</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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25128"><![CDATA[Replication]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 19 Aug 2020 15:54:06 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 12 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-33182'>SERVER-33182</a></s>]]></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>
                            1 year, 12 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>65.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>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-repl</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
            <customfieldvalue>suganthi.mani@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hy14af:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxnr6v:</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_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|hy0qjr:</customfieldvalue>

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