<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:16:13 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-48129] Invariant that operations which are holding open an oplog hole cannot block when acquiring locks</title>
                <link>https://jira.mongodb.org/browse/SERVER-48129</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46698&quot; title=&quot;Invariant that operations which are holding open an oplog hole cannot call blocking functions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-46698&quot;&gt;&lt;del&gt;SERVER-46698&lt;/del&gt;&lt;/a&gt; invariants that operations which are holding open an oplog hole cannot acquire a storage engine ticket or flow control ticket.&lt;/p&gt;

&lt;p&gt;We also attempted to invariant when acquiring a lock, namely in &lt;tt&gt;&lt;a href=&quot;http://github.com/mongodb/mongo/blob/1417eee440b4132e24d1388011d681e2c9fcec41/src/mongo/db/concurrency/lock_state.cpp#L824&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;LockerImpl::_lockBegin&lt;/a&gt;&lt;/tt&gt;&#160;and &lt;tt&gt;&lt;a href=&quot;http://github.com/mongodb/mongo/blob/1417eee440b4132e24d1388011d681e2c9fcec41/src/mongo/db/concurrency/lock_state.cpp#L900&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;LockerImpl::_lockComplete&lt;/a&gt;&lt;/tt&gt;,&#160;but discovered that a MODE_IX lock on the session transactions table is acquired while holding open an oplog hole in at least two different code paths.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;In &lt;tt&gt;&lt;a href=&quot;http://github.com/mongodb/mongo/blob/1417eee440b4132e24d1388011d681e2c9fcec41/src/mongo/db/op_observer_impl.cpp#L923&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;logApplyOpsForTransaction&lt;/a&gt;&lt;/tt&gt;, an oplog hole is opened (via &lt;tt&gt;RecoveryUnit::setTimestamp&lt;/tt&gt;) by &lt;tt&gt;logOperation&lt;/tt&gt;. A MODE_IX lock on the session transactions table is then acquired &lt;a href=&quot;http://github.com/mongodb/mongo/blob/14bb6a661fc7a8b693613203693b8232c6f91944/src/mongo/db/transaction_participant.cpp#L207&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;&#160;by &lt;tt&gt;onWriteOpCompleted&lt;/tt&gt; (via &lt;tt&gt;updateSessionEntry&lt;/tt&gt; in &lt;tt&gt;onWriteOpCompletedOnPrimary&lt;/tt&gt;).&lt;/li&gt;
	&lt;li&gt;In &lt;tt&gt;&lt;a href=&quot;http://github.com/mongodb/mongo/blob/1417eee440b4132e24d1388011d681e2c9fcec41/src/mongo/db/op_observer_impl.cpp#L416&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;OpObserverImpl::onInserts&lt;/a&gt;&lt;/tt&gt;, an oplog hole is opened by &lt;tt&gt;repl::logInsertOps&lt;/tt&gt;. A MODE_IX lock on the session transactions table is then acquired &lt;a href=&quot;http://github.com/mongodb/mongo/blob/14bb6a661fc7a8b693613203693b8232c6f91944/src/mongo/db/transaction_participant.cpp#L207&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;&#160;by &lt;tt&gt;onWriteOpCompleted&lt;/tt&gt; (via &lt;tt&gt;updateSessionEntry&lt;/tt&gt; in &lt;tt&gt;onWriteOpCompletedOnPrimary&lt;/tt&gt;).&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The goal of this ticket should be to&#160;&lt;b&gt;(a)&lt;/b&gt; determine whether acquiring the MODE_IX lock on the session transactions table can actually block in practice (perhaps another thread acquires a MODE_X or MODE_S lock on the session transactions table) and to&#160;&lt;b&gt;(b)&lt;/b&gt; invariant that&#160;operations which are holding open an oplog hole cannot block when acquiring locks.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1347970">SERVER-48129</key>
            <summary>Invariant that operations which are holding open an oplog hole cannot block when acquiring locks</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="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="gregory.wlodarek@mongodb.com">Gregory Wlodarek</assignee>
                                    <reporter username="james.heppenstall@mongodb.com">James Heppenstall</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 May 2020 12:48:27 +0000</created>
                <updated>Sun, 29 Oct 2023 22:08:21 +0000</updated>
                            <resolved>Tue, 13 Jul 2021 14:52:41 +0000</resolved>
                                                    <fixVersion>5.1.0-rc0</fixVersion>
                                                        <votes>1</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="4108295" author="JIRAUSER1259052" created="Wed, 6 Oct 2021 19:02:58 +0000"  >&lt;p&gt;Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it&#8217;s been triggered. For more active release information, please keep an eye on #server-release. Thank you!&lt;/p&gt;</comment>
                            <comment id="3930535" author="xgen-internal-githook" created="Tue, 13 Jul 2021 14:27:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Wlodarek&apos;, &apos;email&apos;: &apos;gregory.wlodarek@mongodb.com&apos;, &apos;username&apos;: &apos;GWlodarek&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48129&quot; title=&quot;Invariant that operations which are holding open an oplog hole cannot block when acquiring locks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48129&quot;&gt;&lt;del&gt;SERVER-48129&lt;/del&gt;&lt;/a&gt; Invariant that operations which are holding open an oplog hole cannot block when acquiring locks&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/5a2e80c11092052b88ddaffe002ca32438b1fe5a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/5a2e80c11092052b88ddaffe002ca32438b1fe5a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3930534" author="xgen-internal-githook" created="Tue, 13 Jul 2021 14:27:10 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Wlodarek&apos;, &apos;email&apos;: &apos;gregory.wlodarek@mongodb.com&apos;, &apos;username&apos;: &apos;GWlodarek&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48129&quot; title=&quot;Invariant that operations which are holding open an oplog hole cannot block when acquiring locks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48129&quot;&gt;&lt;del&gt;SERVER-48129&lt;/del&gt;&lt;/a&gt; Add new AllowLockAcquisitionOnTimestampedUnitOfWork RAII type&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4647a428aa53b84dc2b619e87875eff6653d7b08&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4647a428aa53b84dc2b619e87875eff6653d7b08&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3930533" author="xgen-internal-githook" created="Tue, 13 Jul 2021 14:27:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gregory Wlodarek&apos;, &apos;email&apos;: &apos;gregory.wlodarek@mongodb.com&apos;, &apos;username&apos;: &apos;GWlodarek&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-48129&quot; title=&quot;Invariant that operations which are holding open an oplog hole cannot block when acquiring locks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-48129&quot;&gt;&lt;del&gt;SERVER-48129&lt;/del&gt;&lt;/a&gt; Remove unused variables in AutoGetOplog&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/024707a98614c24d10e8ab0c61c27642672a182a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/024707a98614c24d10e8ab0c61c27642672a182a&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="1242014">SERVER-46698</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1807595">SERVER-58223</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1807663">SERVER-58243</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1807590">SERVER-58222</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1807576">SERVER-58219</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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 2 Jul 2021 15:26:38 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 18 weeks 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-46698'>SERVER-46698</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_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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2057</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>
                            2 years, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>gregory.wlodarek@mongodb.com</customfieldvalue>
            <customfieldvalue>james.heppenstall@mongodb.com</customfieldvalue>
            <customfieldvalue>vivian.ge@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hxku5j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr30hb:</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="4880">Execution Team 2021-06-28</customfieldvalue>
    <customfieldvalue id="4881">Execution Team 2021-07-12</customfieldvalue>
    <customfieldvalue id="4882">Execution Team 2021-07-26</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|hxkgev:</customfieldvalue>

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