<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:43:33 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-36588] Handle non-locking killCursors in transactions</title>
                <link>https://jira.mongodb.org/browse/SERVER-36588</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In MongoDB 4.0, when the&#160;&lt;tt&gt;killCursors&lt;/tt&gt; command is issued as part of a transaction, it checks out the session and uses the same locker as the transaction. This is important because &lt;tt&gt;killCursors&lt;/tt&gt; must take locks, so if it used a different locker, then it could block behind a DDL operation that is blocked behind the transaction, preventing the &lt;tt&gt;killCursors&lt;/tt&gt; (and the transaction that it is part of) from making progress.&lt;/p&gt;

&lt;p&gt;When all cursors are globally managed, &lt;tt&gt;killCursors&lt;/tt&gt; will no longer need to take locks. This means it no longer needs to use the same locker as the transaction. It also means that &lt;tt&gt;killCursors&lt;/tt&gt; will trigger an invariant if it is the first operation in the transaction, since&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/dd9cde58aefccf634322bfc662cb7f6980f6c1d2/src/mongo/db/concurrency/lock_state.cpp#L827&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;we expect the locker to be non-empty&lt;/a&gt; when we release its WT ticket and stash transaction resources.&lt;/p&gt;

&lt;p&gt;We have a few options for how to address this. We could ban &lt;tt&gt;killCursors&lt;/tt&gt; from being the first statement in a transaction. We could ban &lt;tt&gt;killCursors&lt;/tt&gt; in transactions entirely (though this would require drivers changes). Or we could allow transactions to stash an empty locker.&lt;/p&gt;</description>
                <environment></environment>
        <key id="586597">SERVER-36588</key>
            <summary>Handle non-locking killCursors in transactions</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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-query-execution">Backlog - Query Execution</assignee>
                                    <reporter username="tess.avitabile@mongodb.com">Tess Avitabile</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Aug 2018 15:45:26 +0000</created>
                <updated>Tue, 6 Dec 2022 03:21:32 +0000</updated>
                                                                            <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2140940" author="tess.avitabile" created="Thu, 7 Feb 2019 14:30:39 +0000"  >&lt;p&gt;Correct, this is an optional simplification. killCursors could now skip session checkout (by removing it from &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a1442e88e77fff49dd20a11953a6012be66d4b79/src/mongo/db/transaction_validation.cpp#L67&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this list&lt;/a&gt;) and we could remove the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a1442e88e77fff49dd20a11953a6012be66d4b79/src/mongo/db/transaction_validation.cpp#L107&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;restriction&lt;/a&gt;&#160;that killCursors must not be the first statement in a transaction. &#160;This is not very important.&lt;/p&gt;</comment>
                            <comment id="2140553" author="david.storch" created="Thu, 7 Feb 2019 00:19:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt; now that all cursors are globally managed, we should re-prioritize this issue. Can you elaborate on whether this is still important? If I understand correctly, this is an optional simplification that we could make in the transactions code now that &lt;tt&gt;killCursors&lt;/tt&gt; does not acquire a lock.&lt;/p&gt;</comment>
                            <comment id="1984975" author="tess.avitabile" created="Fri, 24 Aug 2018 15:42:41 +0000"  >&lt;p&gt;I did not realize, but we now &lt;a href=&quot;https://github.com/mongodb/mongo/blob/f7c2600036ce876bb389f3eb3adc8eada6932d8b/src/mongo/db/transaction_participant.cpp#L513&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;always take a lock at the start of a transaction&lt;/a&gt;, so there may not be a problem.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25125"><![CDATA[Query Execution]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 7 Feb 2019 00:19:12 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 6 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_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, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-execution</customfieldvalue>
            <customfieldvalue>david.storch@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|hu57br:</customfieldvalue>

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

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