<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:58: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-41613] FSyncLockThread::run() should not hold a lock while calling waitUntilDurable()</title>
                <link>https://jira.mongodb.org/browse/SERVER-41613</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/82dd1226e19fdb6a8fe0c2c2024e65b18b1c336e/src/mongo/db/commands/fsync.cpp#L350&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;The GlobalRead lock is acquired in fsync&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/82dd1226e19fdb6a8fe0c2c2024e65b18b1c336e/src/mongo/db/commands/fsync.cpp#L401-L404&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;we only call waitUntilDurable() if _allowFsyncFailure is set&lt;/a&gt;. _allowFsyncFailure is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/82dd1226e19fdb6a8fe0c2c2024e65b18b1c336e/src/mongo/db/commands/fsync.cpp#L141-L144&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;only set if getTestCommandsEnabled() and the &quot;allowFsyncFailure&quot; flag was set on the cmd request&lt;/a&gt;, which was added to make fsync+lock block writes against the server regardless of fsync success. That was added in &lt;a href=&quot;https://github.com/mongodb/mongo/commit/ca4d34ece27104dd9bb62f9e46120e83398b71f3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this commit for the backup work&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="795313">SERVER-41613</key>
            <summary>FSyncLockThread::run() should not hold a lock while calling waitUntilDurable()</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="daniel.gottlieb@mongodb.com">Daniel Gottlieb</assignee>
                                    <reporter username="dianna.hohensee@mongodb.com">Dianna Hohensee</reporter>
                        <labels>
                            <label>execution_intern_2019</label>
                    </labels>
                <created>Mon, 10 Jun 2019 19:11:09 +0000</created>
                <updated>Sun, 29 Oct 2023 22:20:10 +0000</updated>
                            <resolved>Fri, 27 Sep 2019 19:50:16 +0000</resolved>
                                                    <fixVersion>4.3.1</fixVersion>
                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2437081" author="xgen-internal-githook" created="Fri, 27 Sep 2019 19:49:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Daniel Gottlieb&apos;, &apos;username&apos;: &apos;dgottlieb&apos;, &apos;email&apos;: &apos;daniel.gottlieb@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41613&quot; title=&quot;FSyncLockThread::run() should not hold a lock while calling waitUntilDurable()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41613&quot;&gt;&lt;del&gt;SERVER-41613&lt;/del&gt;&lt;/a&gt;: Remove superfluous durability call in fsync with &lt;/p&gt;
{allowFsyncFailure: true}
&lt;p&gt;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f268c776da964de7cb15b09ff38f1b90bbce4c85&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f268c776da964de7cb15b09ff38f1b90bbce4c85&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2427030" author="dianna.hohensee" created="Fri, 20 Sep 2019 20:30:50 +0000"  >&lt;p&gt;This ticket was spun off of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39591&quot; title=&quot;RecoveryUnit::waitUntilDurable() should invariant against callers holding locks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39591&quot;&gt;&lt;del&gt;SERVER-39591&lt;/del&gt;&lt;/a&gt;, where we want to invariant against locks being held across &lt;tt&gt;waitUntilDurable()&lt;/tt&gt; calls: I/O can take relatively a long time, and we do not want to block other operations for a long time, potentially blocking other operations. I would argue that &lt;tt&gt;waitUntilDurable()&lt;/tt&gt; it much more common than &lt;tt&gt;flushAllFiles()&lt;/tt&gt;, and adding the invariant would safeguard that code path.&lt;/p&gt;

&lt;p&gt;Looking at the code, it seems like &lt;tt&gt;WiredTigerSessionCache&lt;/tt&gt; has a &lt;tt&gt;shuttingDown()&lt;/tt&gt; function wherein &lt;a href=&quot;https://github.com/mongodb/mongo/blob/852a39f9f3b6b2dbaf024b5747459933084985f5/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp#L226-L233&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;we will wait until there are no more callers, just spinning until that is the case before returning&lt;/a&gt;. &lt;tt&gt;waitUntilDurable()&lt;/tt&gt; makes sure that WiredTigerSessionCache knows it&apos;s running (registers itself) with &lt;a href=&quot;https://github.com/mongodb/mongo/blob/852a39f9f3b6b2dbaf024b5747459933084985f5/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp#L247-L252&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this check&lt;/a&gt;. Most callers of &lt;tt&gt;waitUntilDurable()&lt;/tt&gt; don&apos;t hold locks today, I believe: there were only 3 places that &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39591&quot; title=&quot;RecoveryUnit::waitUntilDurable() should invariant against callers holding locks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39591&quot;&gt;&lt;del&gt;SERVER-39591&lt;/del&gt;&lt;/a&gt; ran into trouble, fsync being one of them.&lt;/p&gt;</comment>
                            <comment id="2417082" author="daniel.gottlieb@10gen.com" created="Wed, 11 Sep 2019 20:15:15 +0000"  >&lt;p&gt;Maybe I&apos;m missing something. If code calls &lt;tt&gt;waitUntilDurable&lt;/tt&gt; without locks, what&apos;s protecting the storage engine from being closed?&lt;/p&gt;

&lt;p&gt;Additionally, there are two other spots in &lt;tt&gt;fsync&lt;/tt&gt; that call &lt;tt&gt;WiredTigerSessionCache::waitUntilDurable&lt;/tt&gt;: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2c3e8294acf82fff975a620b5fc45778c6ef2a45/src/mongo/db/commands/fsync.cpp#L148-L150&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2c3e8294acf82fff975a620b5fc45778c6ef2a45/src/mongo/db/commands/fsync.cpp#L374&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;. It just happens that those bypass &lt;tt&gt;RecoveryUnit::waitUntilDurable&lt;/tt&gt;. Where &lt;tt&gt;RecoveryUnit::waitUntilDurable&lt;/tt&gt; just forwards to the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/2c3e8294acf82fff975a620b5fc45778c6ef2a45/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp#L258&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;session cache implementation&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2304900" author="milkie" created="Fri, 28 Jun 2019 16:36:08 +0000"  >&lt;p&gt;After some investigation, I think it&apos;s ok to simply remove the waitUntilDurable() call.  The only jstest that is using the allowFsyncFailure flag is only calling fsyncLock to get the lock behavior, not the fsync behavior, and we already called flushAllFiles() in that code path anyway.&lt;/p&gt;</comment>
                            <comment id="2285165" author="dianna.hohensee" created="Fri, 14 Jun 2019 15:27:09 +0000"  >&lt;p&gt;Done.&lt;/p&gt;</comment>
                            <comment id="2285004" author="milkie" created="Fri, 14 Jun 2019 14:46:29 +0000"  >&lt;p&gt;We should link here what the code location is that is locking and calling waitUntilDurable().&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="697915">SERVER-39591</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>6.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, 14 Jun 2019 14:46:29 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 19 weeks, 5 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_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_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>
                            4 years, 19 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hv3z7z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvazgf:</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="3210">Execution Team 2019-09-09</customfieldvalue>
    <customfieldvalue id="3211">Execution Team 2019-09-23</customfieldvalue>
    <customfieldvalue id="3212">Execution Team 2019-10-07</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|hv3lhb:</customfieldvalue>

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