<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:13:36 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-69496] InterruptedAtShutdown can be thrown without the operation context being marked as killed</title>
                <link>https://jira.mongodb.org/browse/SERVER-69496</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;During shutdown, we first &lt;a href=&quot;https://github.com/mongodb/mongo/blob/16b22af0483333fba942c835cdc4ab5ae3dfcf23/src/mongo/db/service_context.cpp#L350&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;set the global kill flag&lt;/a&gt; and then &lt;a href=&quot;https://github.com/mongodb/mongo/blob/16b22af0483333fba942c835cdc4ab5ae3dfcf23/src/mongo/db/service_context.cpp#L353-L367&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mark each operation context as killed&lt;/a&gt;. In &lt;tt&gt;OperationContext::checkForInterruptNoAssert&lt;/tt&gt;, we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/16b22af0483333fba942c835cdc4ab5ae3dfcf23/src/mongo/db/operation_context.cpp#L236-L239&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;return &lt;tt&gt;InterruptedAtShutdown&lt;/tt&gt; if the global kill flag is set&lt;/a&gt;. However, we do not mark the operation context as killed from here. This means that if an operation explicitly checks for interrupts and we get an interleaving where this occurs between the two steps in &lt;tt&gt;ServiceContext::setKillAllOperations&lt;/tt&gt;, that operation will get an &lt;tt&gt;InterruptedAtShutdown&lt;/tt&gt; exception with the operation context not (yet) marked as killed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2130867">SERVER-69496</key>
            <summary>InterruptedAtShutdown can be thrown without the operation context being marked as killed</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13202">Works as Designed</resolution>
                                        <assignee username="matt.diener@mongodb.com">Matt Diener</assignee>
                                    <reporter username="gregory.noma@mongodb.com">Gregory Noma</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Sep 2022 14:47:51 +0000</created>
                <updated>Fri, 27 Oct 2023 13:51:54 +0000</updated>
                            <resolved>Mon, 3 Oct 2022 19:08:05 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4874129" author="JIRAUSER1264675" created="Mon, 3 Oct 2022 19:08:05 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-70010&quot; title=&quot;Stop using getKillStatus to check for OperationContext interruption.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-70010&quot;&gt;&lt;del&gt;SERVER-70010&lt;/del&gt;&lt;/a&gt; is fixed. As much as this conflation between Killed and Interrupted is likely to cause confusion again in the future, and as complex as the distinction may be. Fixing it is not a short-term endeavor.&lt;/p&gt;

&lt;p&gt;Instead of this task, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-70010&quot; title=&quot;Stop using getKillStatus to check for OperationContext interruption.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-70010&quot;&gt;&lt;del&gt;SERVER-70010&lt;/del&gt;&lt;/a&gt; should keep us in good shape while SA takes this feedback into account and carries forward existing initiatives to take a 2nd look at interruption semantics, error handling semantics, and complexity around the OperationContext.&lt;/p&gt;</comment>
                            <comment id="4865451" author="JIRAUSER1264675" created="Thu, 29 Sep 2022 14:58:27 +0000"  >&lt;p&gt;Update: sent out 3 PRs for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-70010&quot; title=&quot;Stop using getKillStatus to check for OperationContext interruption.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-70010&quot;&gt;&lt;del&gt;SERVER-70010&lt;/del&gt;&lt;/a&gt;. Once these are closed, this bug can be closed as &quot;Works as Designed&quot;. Code using killStatus because of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56251&quot; title=&quot;Alleviate problems that arise when OperationContext::markKilled is called with a non-Interruption error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56251&quot;&gt;SERVER-56251&lt;/a&gt; will no longer exist.&lt;/p&gt;</comment>
                            <comment id="4859407" author="JIRAUSER1264675" created="Tue, 27 Sep 2022 17:57:55 +0000"  >&lt;p&gt;Moving this back to open, but keeping it open until the completion of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-70010&quot; title=&quot;Stop using getKillStatus to check for OperationContext interruption.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-70010&quot;&gt;&lt;del&gt;SERVER-70010&lt;/del&gt;&lt;/a&gt;. Then I will close as &quot;Works as Designed&quot;&lt;/p&gt;</comment>
                            <comment id="4844333" author="louis.williams" created="Wed, 21 Sep 2022 09:29:00 +0000"  >&lt;p&gt;Does this mean that the current requirement for every catch() that checks isKillPending must also check whether the thrown exception was InterruptedAtShutdown? I feel like this is quite risky for managing exceptions in the server and determining whether or not an operation was interrupted. We already had to handle some test fallout from this requirement (e.g. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69593&quot; title=&quot;Temporarily allow InterruptedAtShutdown error code in OplogCapMaintainerThread&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69593&quot;&gt;&lt;del&gt;SERVER-69593&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-69505&quot; title=&quot;Temporarily allow InterruptedAtShutdown error code during index build cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-69505&quot;&gt;&lt;del&gt;SERVER-69505&lt;/del&gt;&lt;/a&gt;) from the changes we made in our codebase. I fear that the new expectations around interruptions are more complicated than previous API of checking for the Interruption error category and risk uncaught exceptions escaping threads.&lt;/p&gt;</comment>
                            <comment id="4842980" author="max.hirschhorn@10gen.com" created="Tue, 20 Sep 2022 19:02:47 +0000"  >&lt;blockquote&gt;
&lt;p&gt;If we are asking whether work associated with an opCtx should stop, we should use `checkForInterruptNoAssert` to get a Status. If we care about whether the opCtx is killed or explicitly want to know the reason it has been killed, use `getKillStatus()`.&lt;/p&gt;

&lt;p&gt;Usage of both may be required for some use cases, as `checkForInterruptNoAssert` doesn&apos;t guarantee it&apos;ll return the kill Status.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=matt.diener%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;matt.diener@mongodb.com&quot;&gt;matt.diener@mongodb.com&lt;/a&gt;, can you clarify about the instructions and possible solutions in the tickets linked to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-56251&quot; title=&quot;Alleviate problems that arise when OperationContext::markKilled is called with a non-Interruption error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-56251&quot;&gt;SERVER-56251&lt;/a&gt; (e.g. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-67617&quot; title=&quot;Stop using ErrorCategory::Interruption in Replication codebase&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-67617&quot;&gt;&lt;del&gt;SERVER-67617&lt;/del&gt;&lt;/a&gt;)? Calling OperationContext::getKillStatus() is what had been proposed there.&lt;/p&gt;</comment>
                            <comment id="4842851" author="JIRAUSER1264675" created="Tue, 20 Sep 2022 18:33:41 +0000"  >&lt;p&gt;The design is unfortunately confusing but there is a distinction between Interrupted and Killed in the opCtx.&lt;/p&gt;

&lt;p&gt;If we are asking whether work associated with an opCtx should stop, we should use `checkForInterruptNoAssert` to get a Status. If we care about whether the opCtx is killed or explicitly want to know the reason it has been killed, use `getKillStatus()`.&lt;/p&gt;

&lt;p&gt;Usage of both may be required for some use cases, as `checkForInterruptNoAssert` doesn&apos;t guarantee it&apos;ll return the kill Status.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="2146145">SERVER-70010</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2112829">SERVER-68808</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2131405">SERVER-69505</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2134113">SERVER-69593</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2141778">SERVER-69839</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2131392">SERVER-69504</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 7 Sep 2022 15:15:26 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 18 weeks, 2 days 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-70010'>SERVER-70010</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_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>
                            1 year, 18 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>151.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>gregory.noma@mongodb.com</customfieldvalue>
            <customfieldvalue>louis.williams@mongodb.com</customfieldvalue>
            <customfieldvalue>matt.diener@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i198mn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0trh8:</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="6501">Service Arch 2022-09-19</customfieldvalue>
    <customfieldvalue id="6574">Service Arch 2022-10-03</customfieldvalue>
    <customfieldvalue id="6575">Service Arch 2022-10-17</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|i18urz:</customfieldvalue>

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