<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:38:48 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-35091] Profiling in transactions should only be interrupted due to lock acquisition failure</title>
                <link>https://jira.mongodb.org/browse/SERVER-35091</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34726&quot; title=&quot;Deadlock with locally stashed transaction resources during profiling&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34726&quot;&gt;&lt;del&gt;SERVER-34726&lt;/del&gt;&lt;/a&gt; removes the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a218a4867490ab99981aedf35965b7b06406b29e/src/mongo/db/introspect.cpp#L122&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;UninterruptibleLockGuard&lt;/tt&gt;&lt;/a&gt; protecting lock acquisitions for profiling of transaction operations. This is done to allow lock acquisitions for profiling of transaction operations to have a maxTransactionLockRequestTimeoutMillis timeout. However, the &lt;tt&gt;UninterruptibleLockGuard&lt;/tt&gt; also &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a218a4867490ab99981aedf35965b7b06406b29e/src/mongo/db/concurrency/lock_state.cpp#L796&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;prevented checking whether the operation was interrupted or timed out&lt;/a&gt;, which is desirable behavior. We would like profiling for transaction operations to succeed if the operation was interrupted or timed out, while preserving the maxTransactionLockRequestTimeoutMillis lock acquisition timeout.&lt;/p&gt;</description>
                <environment></environment>
        <key id="546478">SERVER-35091</key>
            <summary>Profiling in transactions should only be interrupted due to lock acquisition failure</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="backlog-server-repl">Backlog - Replication Team</assignee>
                                    <reporter username="tess.avitabile@mongodb.com">Tess Avitabile</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 May 2018 19:57:41 +0000</created>
                <updated>Tue, 6 Dec 2022 03:28:44 +0000</updated>
                            <resolved>Wed, 30 May 2018 21:34:40 +0000</resolved>
                                                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="1905273" author="spencer" created="Wed, 30 May 2018 21:34:34 +0000"  >&lt;p&gt;Closing this in favor of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35298&quot; title=&quot;Profiling transaction operations should always succeed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35298&quot;&gt;SERVER-35298&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1896835" author="dianna.hohensee" created="Mon, 21 May 2018 13:13:05 +0000"  >&lt;p&gt;So it looks like the kill flag has migrated from CurOp to OperationContext::_killCode in recent times. The ServiceContext has a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6ab1592260c9b21d802aa65a11d268c0a97b11a7/src/mongo/db/service_context.cpp#L291&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;killOperation&lt;/a&gt; function that calls &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6ab1592260c9b21d802aa65a11d268c0a97b11a7/src/mongo/db/operation_context.cpp#L343&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;OperationContext::markKilled&lt;/a&gt;. The only complication with temporarily unsetting the _killCode field is that it looks like killOperation/markKilled is called asynchronous and can be called multiple times. I would therefore suggest adding a flag to OperationContext such that we can skip checking the _killCode &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6ab1592260c9b21d802aa65a11d268c0a97b11a7/src/mongo/db/operation_context.cpp#L210&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here in OperationContext::checkForInterruptNoAssert&lt;/a&gt;. _killCode is only used for set, get and check for interrupt. We will leave set and get to behave normally, so it remains correct, and just temporarily put checking it on hold. I believe this conforms with the idea of suspending kill/maxTimeMS on the OperationContext.&lt;/p&gt;

&lt;p&gt;With that addition, I think the solution we wanted for&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34726&quot; title=&quot;Deadlock with locally stashed transaction resources during profiling&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34726&quot;&gt;&lt;del&gt;SERVER-34726&lt;/del&gt;&lt;/a&gt; will work again.&lt;/p&gt;</comment>
                            <comment id="1895920" author="milkie" created="Fri, 18 May 2018 21:27:36 +0000"  >&lt;p&gt;I investigated more carefully and it doesn&apos;t clear like I thought it did.  However, we might consider actually clearing the kill flag in CurOp::completeAndLogOperation(), since it would make sense that by the time this function has been called, we&apos;ve already serviced the kill request.  Alternatively, we could destroy the CurOp object after completeAndLogOperation is called (since we&apos;ve already stopped timing the operation), and then adjust code to handle a Client with no active CurOp attached.&lt;/p&gt;</comment>
                            <comment id="1895895" author="tess.avitabile" created="Fri, 18 May 2018 20:49:49 +0000"  >&lt;p&gt;Profiling does succeed for ops that were interrupted or timed out, but my understanding was that this is due to the &lt;tt&gt;UninterruptibleLockGuard&lt;/tt&gt;. Do you know where we might be clearing the killed and maxTimeMS flags?&lt;/p&gt;</comment>
                            <comment id="1895867" author="milkie" created="Fri, 18 May 2018 20:24:45 +0000"  >&lt;p&gt;I thought with the way we implemented profiling, the killed and maxTimeMs flags would be cleared when it ran, because it&apos;s separate.  So I would expect profiling to succeed for ops that were interrupted or timed out?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="551487">SERVER-35298</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>5.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_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15640"><![CDATA[v4.0]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 18 May 2018 20:24:45 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 37 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-repl</customfieldvalue>
            <customfieldvalue>dianna.hohensee@mongodb.com</customfieldvalue>
            <customfieldvalue>milkie@mongodb.com</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
            <customfieldvalue>tess.avitabile@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htyhuf:</customfieldvalue>

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

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