<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:51:57 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-61251] Ensure long running storage engine operations are interruptible</title>
                <link>https://jira.mongodb.org/browse/SERVER-61251</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Long running storage engine operations don&apos;t have interrupt points and thus can block step down.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1918423">SERVER-61251</key>
            <summary>Ensure long running storage engine operations are interruptible</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-storage-engines">Backlog - Storage Engines Team</assignee>
                                    <reporter username="judah.schvimer@mongodb.com">Judah Schvimer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Nov 2021 18:12:10 +0000</created>
                <updated>Wed, 6 Dec 2023 21:11:45 +0000</updated>
                                                                                                <votes>1</votes>
                                    <watches>24</watches>
                                                                                                                <comments>
                            <comment id="5442156" author="judah.schvimer" created="Mon, 22 May 2023 14:57:18 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alexander.gorrod%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;alexander.gorrod@mongodb.com&quot;&gt;alexander.gorrod@mongodb.com&lt;/a&gt;, it was a general idea from a Workload Management discussion. I don&apos;t think it&apos;s critical.&lt;/p&gt;</comment>
                            <comment id="5440961" author="alexander.gorrod" created="Mon, 22 May 2023 04:49:35 +0000"  >&lt;p&gt;Is that a question for WiredTiger &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer@mongodb.com&quot;&gt;judah.schvimer@mongodb.com&lt;/a&gt;? As in, could a transaction be paused and restarted? The answer is not safely - we built a mechanism a bit like that for prepared transactions, and the corner cases are numerous and annoying (we are in fact still chasing them, &lt;a href=&quot;https://jira.mongodb.org/browse/WT-11064&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;for example&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are taking small steps in that direction, but I expect it will be a fair while before it&apos;s a tractable amount of work in WiredTiger. Let me know if it&apos;s important enough to justify doing a bit more design than my gut response and we&apos;ll give a more complete answer.&lt;/p&gt;

&lt;p&gt;cc &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mick.graham%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;mick.graham@mongodb.com&quot;&gt;mick.graham@mongodb.com&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5438524" author="judah.schvimer" created="Fri, 19 May 2023 16:02:42 +0000"  >&lt;p&gt;A related question is if long running WT operations can be yieldable, especially for Workload Management once we start prioritizing amongst running queries.&lt;/p&gt;</comment>
                            <comment id="5358067" author="louis.williams" created="Wed, 19 Apr 2023 07:43:41 +0000"  >&lt;p&gt;I wanted to link to a &lt;a href=&quot;https://jira.mongodb.org/browse/WT-10892?focusedCommentId=5356077&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-5356077&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;comment&lt;/a&gt; that &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=sue.loverso%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;sue.loverso@mongodb.com&quot;&gt;sue.loverso@mongodb.com&lt;/a&gt; left on &lt;a href=&quot;https://jira.mongodb.org/browse/WT-10892&quot; title=&quot;Session configuration to allow operations to skip cache eviction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;WT-10892&quot;&gt;WT-10892&lt;/a&gt;. In an attempt to reduce the overhead and risk of frequent interrupt checking in fast code paths, what we need at a minimum is to check for interrupts in the slow WiredTiger code paths that can block indefinitely, specifically in the eviction worker loop. What we want is to be able to pull operations out of the eviction loop, since that is where we find operations blocked inside WiredTiger most of the time.&lt;/p&gt;</comment>
                            <comment id="5355885" author="dianna.hohensee" created="Tue, 18 Apr 2023 15:15:41 +0000"  >&lt;p&gt;Some additional information from working on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-70201&quot; title=&quot;Make compact killable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-70201&quot;&gt;&lt;del&gt;SERVER-70201&lt;/del&gt;&lt;/a&gt;, to interrupt WT::compact from the MDB layer.&lt;/p&gt;

&lt;p&gt;We ended up passing a pointer to the opCtx into the storage layer for WT::compact interrupt checks. So if the opCtx in the MDB layer gets interrupted, then WT::compact can see that eventually and quit. This could be expanded generally for all MDB operations (all have an opCtx) accessing the WT layer.&lt;/p&gt;

&lt;p&gt;I think this solution addresses the concern that operations would be immediately resubmitted to WT and nothing would be gained: operations in the MDB layer are interrupted today with positive effect &#8211; not just restarted immediately with no change.&#160;&lt;/p&gt;</comment>
                            <comment id="5321672" author="alexander.gorrod" created="Mon, 3 Apr 2023 23:04:56 +0000"  >&lt;p&gt;Notes from a group conversation about this:&lt;/p&gt;

&lt;p&gt;The primary use case to be addressed here is short running operations that can sometimes be held for a long time by WiredTiger.&lt;/p&gt;

&lt;p&gt;Ideally, WiredTiger would provide a mechanism by which MongoDB could notify us that an operation should be interrupted. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=keith.smith%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;keith.smith@mongodb.com&quot;&gt;keith.smith@mongodb.com&lt;/a&gt; indicated that there is an existing callback mechanism in place for &lt;tt&gt;compact&lt;/tt&gt; that can trigger an interrupt.&lt;/p&gt;

&lt;p&gt;I indicated that it&apos;s important for server and storage engines engineers to collaborate on this work. It wouldn&apos;t be generally beneficial to give up on operations if the response is for the server to resubmit the same work to WiredTiger in a new transaction. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer@mongodb.com&quot;&gt;judah.schvimer@mongodb.com&lt;/a&gt; indicated that a Storage Execution engineer would be most suitable from the server team to work on this.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=steve.kuhn%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;steve.kuhn@mongodb.com&quot;&gt;steve.kuhn@mongodb.com&lt;/a&gt; If you think this work is worthwhile, we should create a WiredTiger ticket to track the Storage Engines work and figure out how to get the time scheduled.&lt;/p&gt;</comment>
                            <comment id="5266471" author="alexander.gorrod" created="Mon, 13 Mar 2023 01:04:24 +0000"  >&lt;p&gt;I believe that compact is a different case to the others referenced in this ticket. Compact is a complex, long running command in WiredTiger. It is reasonable to add interrupt points into compact and return early if the caller wants that behavior.&lt;/p&gt;

&lt;p&gt;Other cases described here were a &lt;tt&gt;WT_SESSION::commit&lt;/tt&gt; or &lt;tt&gt;WT_SESSION::abort&lt;/tt&gt; can take a long time to complete are different. There are two possible causes for those APIs to take a long time: They are resolving a prepared transaction which can be expensive. The WiredTiger cache is over-subscribed (generally due to being overwhelmed by too much concurrent activity), and the transaction resolution is being tasked with helping ensure the cache doesn&apos;t become oversubscribed (which can lead to processes being killed by the operating system).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=steve.kuhn%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;steve.kuhn@mongodb.com&quot;&gt;steve.kuhn@mongodb.com&lt;/a&gt; Could we chat about what to do with this ticket? It bounces back to us periodically, and it would be nice to have a concrete plan. Is that something you could help create?&lt;/p&gt;</comment>
                            <comment id="5217241" author="JIRAUSER1253362" created="Tue, 21 Feb 2023 16:50:21 +0000"  >&lt;p&gt;One potential idea is to generalize the solution from compact when we made it interruptible.&#160;&lt;/p&gt;</comment>
                            <comment id="4178475" author="lingzhi.deng" created="Tue, 9 Nov 2021 18:48:13 +0000"  >&lt;p&gt;For the help ticket, &lt;tt&gt;mongo::WiredTigerRecoveryUnit::&amp;#95;commit&lt;/tt&gt; and probably &lt;tt&gt;mongo::WiredTigerRecoveryUnit::&amp;#95;abort&lt;/tt&gt; too. But I am not sure what does it mean to interrupt an abort. More generally though, I think we want a solution to make &lt;em&gt;all&lt;/em&gt; storage operations interruptible or have a way at the mongodb layer to avoid being blocked on a storage operation.&lt;/p&gt;</comment>
                            <comment id="4177975" author="gregory.noma" created="Tue, 9 Nov 2021 16:24:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=lingzhi.deng&quot; class=&quot;user-hover&quot; rel=&quot;lingzhi.deng&quot;&gt;lingzhi.deng&lt;/a&gt; which operation was this? Any additional information that would be useful here?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2498588">SERVER-83186</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2010139">SERVER-64982</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1706674">SERVER-56756</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2318488">WT-10958</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2191032">SERVER-71520</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2342183">SERVER-77172</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>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25135"><![CDATA[Storage Engines]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 9 Nov 2021 16:24:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        37 weeks, 2 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-3546</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>louis.williams@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            37 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alexander.gorrod@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-storage-engines</customfieldvalue>
            <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>fausto.leyva@mongodb.com</customfieldvalue>
            <customfieldvalue>gregory.noma@mongodb.com</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>lingzhi.deng@mongodb.com</customfieldvalue>
            <customfieldvalue>louis.williams@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i095q7:</customfieldvalue>

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

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