<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:17:00 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-48398] Writing config document to &quot;local.system.replset&quot; should not acquire PBWM lock.</title>
                <link>https://jira.mongodb.org/browse/SERVER-48398</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;It seems when the node persists new config in collection &quot;local.system.replset&quot;, it takes &quot;local&quot; database lock in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/86a73ffa9f6d38f878420e4e2da68deb4d01d66b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp#L585&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;stronger&lt;/a&gt; mode (X) and PBWM lock in &lt;a href=&quot;https://github.com/mongodb/mongo/blob/86a73ffa9f6d38f878420e4e2da68deb4d01d66b/src/mongo/db/concurrency/d_concurrency.cpp#L152&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;IS&lt;/a&gt; mode. This can lead to 2 major side effects.&lt;br/&gt;
 1) Since PBWM lock is taken in IS mode, this can block the secondary oplog applier which requires PBWM in X mode. This can result in replication lag.&#160;&lt;br/&gt;
 2) Since it takes &quot;local&quot; database lock in X mode, this can block other local database readers and writers. &lt;font color=&quot;#ff8b00&quot;&gt;This will be addressed by&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48399&quot; title=&quot;Writing config document to &amp;quot;local.system.replset&amp;quot; should not acquire database lock in stronger mode (X).&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48399&quot;&gt;&lt;del&gt;SERVER-48399&lt;/del&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Mainly, if this node X is the sync source for node Y, then the oplog fetcher of the node Y can be blocked behind the the reconfig via heartbeat thread due to database lock conflict, leading to replication lag.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Generally, &lt;b&gt;Upserts on non-replicated collection doesn&apos;t need to acquire pbwm lock&lt;/b&gt;. Basically, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d169769bba283cd0a1906c81580ff8e7cf7bcd93/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp#L574&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;storeLocalConfigDocument&lt;/a&gt;&#160; should acquire DB lock under &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d169769bba283cd0a1906c81580ff8e7cf7bcd93/src/mongo/db/concurrency/locker.h#L582&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ShouldNotConflictWithSecondaryBatchApplicationBlock&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1361925">SERVER-48398</key>
            <summary>Writing config document to &quot;local.system.replset&quot; should not acquire PBWM lock.</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="suganthi.mani@mongodb.com">Suganthi Mani</reporter>
                        <labels>
                            <label>former-quick-wins</label>
                    </labels>
                <created>Tue, 26 May 2020 05:30:23 +0000</created>
                <updated>Mon, 8 Jan 2024 15:22:56 +0000</updated>
                                                                            <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="3106308" author="suganthi.mani" created="Tue, 26 May 2020 05:38:20 +0000"  >&lt;p&gt;+ writing last &lt;a href=&quot;https://github.com/mongodb/mongo/blob/86a73ffa9f6d38f878420e4e2da68deb4d01d66b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp#L664&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;vote&lt;/a&gt; document should also not acquire pbwm lock. &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="1451609">SERVER-50519</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="641193">SERVER-38341</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1887086">SERVER-60351</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1361928">SERVER-48399</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>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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 14 Sep 2020 17:19:25 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 37 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_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, 37 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>144.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-repl</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|hxmxfj:</customfieldvalue>

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

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