<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:14:20 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-27164] Deadlock during oplog application when implicitly creating multiple collections on the same DB</title>
                <link>https://jira.mongodb.org/browse/SERVER-27164</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;It is possible for a node to hang during initial sync or steady state replication when CRUD operations implicitly create collections on the same database (e.g. when inserting a document into a collection that did not exist).&lt;/p&gt;

&lt;p&gt;The root cause is likely to be that when a collection creation is deemed necessary, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/99f1f23edbfc07ce00397a4300d28c74b9046b7b/src/mongo/db/repl/sync_tail.cpp#L376&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;each thread applying an operation will try to upgrade an &lt;tt&gt;IX&lt;/tt&gt; lock on the DB to mode &lt;tt&gt;X&lt;/tt&gt;&lt;/a&gt;, causing them to deadlock on each other.&lt;/p&gt;

&lt;p&gt;This issue should have been present in v3.0.0, possibly earlier versions as well.&lt;/p&gt;</description>
                <environment></environment>
        <key id="333759">SERVER-27164</key>
            <summary>Deadlock during oplog application when implicitly creating multiple collections on the same DB</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="9">Done</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="robert.guo@mongodb.com">Robert Guo</reporter>
                        <labels>
                            <label>code-only</label>
                    </labels>
                <created>Tue, 22 Nov 2016 22:26:01 +0000</created>
                <updated>Tue, 6 Dec 2022 04:10:59 +0000</updated>
                            <resolved>Tue, 29 Nov 2016 15:19:45 +0000</resolved>
                                    <version>3.0.0</version>
                    <version>3.2.0</version>
                    <version>3.4.0-rc4</version>
                                    <fixVersion>3.0.15</fixVersion>
                    <fixVersion>3.2.12</fixVersion>
                    <fixVersion>3.4.1</fixVersion>
                    <fixVersion>3.5.1</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="1500217" author="xgen-internal-githook" created="Thu, 16 Feb 2017 16:46:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27164&quot; title=&quot;Deadlock during oplog application when implicitly creating multiple collections on the same DB&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27164&quot;&gt;&lt;del&gt;SERVER-27164&lt;/del&gt;&lt;/a&gt; do not upgrade dblock for replication, to avoid deadlock&lt;/p&gt;

&lt;p&gt;(cherry picked from commit e876419bebadd6468c402e85e1fcf6eff5a374d4)&lt;br/&gt;
Branch: v3.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3105cafb4d712deb5cef0b6b12f137b14d2dee33&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3105cafb4d712deb5cef0b6b12f137b14d2dee33&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1445735" author="xgen-internal-githook" created="Wed, 30 Nov 2016 14:26:11 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27164&quot; title=&quot;Deadlock during oplog application when implicitly creating multiple collections on the same DB&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27164&quot;&gt;&lt;del&gt;SERVER-27164&lt;/del&gt;&lt;/a&gt; do not upgrade dblock for replication, to avoid deadlock&lt;/p&gt;

&lt;p&gt;(cherry picked from commit e876419bebadd6468c402e85e1fcf6eff5a374d4)&lt;br/&gt;
Branch: v3.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e0c00e3eacceadeb3d08e5afaec3135615ac2f71&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e0c00e3eacceadeb3d08e5afaec3135615ac2f71&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1445719" author="xgen-internal-githook" created="Wed, 30 Nov 2016 14:12:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27164&quot; title=&quot;Deadlock during oplog application when implicitly creating multiple collections on the same DB&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27164&quot;&gt;&lt;del&gt;SERVER-27164&lt;/del&gt;&lt;/a&gt; do not upgrade dblock for replication, to avoid deadlock&lt;/p&gt;

&lt;p&gt;(cherry picked from commit e876419bebadd6468c402e85e1fcf6eff5a374d4)&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b144701c0c567ba15e7261a762b66fdee641eaed&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b144701c0c567ba15e7261a762b66fdee641eaed&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1444505" author="xgen-internal-githook" created="Tue, 29 Nov 2016 14:55:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;milkie&apos;, u&apos;name&apos;: u&apos;Eric Milkie&apos;, u&apos;email&apos;: u&apos;milkie@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-27164&quot; title=&quot;Deadlock during oplog application when implicitly creating multiple collections on the same DB&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-27164&quot;&gt;&lt;del&gt;SERVER-27164&lt;/del&gt;&lt;/a&gt; do not upgrade dblock for replication, to avoid deadlock&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e876419bebadd6468c402e85e1fcf6eff5a374d4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e876419bebadd6468c402e85e1fcf6eff5a374d4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1441649" author="milkie" created="Wed, 23 Nov 2016 20:55:12 +0000"  >&lt;p&gt;It is illegal to upgrade a lock via scoped_ptr reset, as this code is doing.  This is because due to the way reset works, the new lock acquisition happens &lt;b&gt;prior&lt;/b&gt; to the old lock being released.  This is not deadlock-safe.&lt;/p&gt;</comment>
                            <comment id="1440682" author="robert.guo" created="Tue, 22 Nov 2016 22:46:38 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=spencer&quot; class=&quot;user-hover&quot; rel=&quot;spencer&quot;&gt;spencer&lt;/a&gt; I updated the version numbers for clarification. This deadlock was observed directly on 3.4, but the code didn&apos;t change much since 3.0, so it should affect earlier versions as well.&lt;/p&gt;</comment>
                            <comment id="1440668" author="spencer" created="Tue, 22 Nov 2016 22:39:14 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=robert.guo&quot; class=&quot;user-hover&quot; rel=&quot;robert.guo&quot;&gt;robert.guo&lt;/a&gt;, does this also affect newer versions, or just 3.0?&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">
                                        <issuelink>
            <issuekey id="334883">SERVER-27205</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>7.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_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_12451" key="com.atlassian.jira.plugin.system.customfieldtypes:multiversion">
                        <customfieldname>Backport Completed</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="17664">3.0.15</customfieldvalue>
    <customfieldvalue id="17669">3.2.12</customfieldvalue>
    <customfieldvalue id="17683">3.4.1</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 22 Nov 2016 22:39:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 51 weeks, 6 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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 51 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.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>backlog-server-repl</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>robert.guo@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjq33:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hss5p3:</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="1311">Repl 2016-12-12</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|hri6fr:</customfieldvalue>

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