<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:36:14 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-77667] Prevent mongos from starting new transactions at shutdown</title>
                <link>https://jira.mongodb.org/browse/SERVER-77667</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;At shutdown, the mongos process performs a best&amp;#45;effort attempt to abort any transactions the mongos process may have started. This is beneficial for freeing up transaction resources more quickly because the client/driver must retry any in&amp;#45;progress transactions which haven&apos;t had their commit coordination handed off already. This is because the transaction protocol does not support committing a multi&amp;#45;statement transaction through a different mongos from the mongos which originally ran the read/write operations. The different mongos can only be used to recover the original commit xor abort decision for the transaction.&lt;/p&gt;

&lt;p&gt;The implicitlyAbortAllTransactions() function which performs this best&amp;#45;effort attempt to abort any transactions the mongos process may have started. However it doesn&apos;t prevent TransactionRouter from being used by a not&amp;#45;yet&amp;#45;interrupted OperationContext and starting a new transaction on a shard. Ordinarily this would be an issue because mongos shutting down is rare and the transaction would eventually be aborted on the shard after the transactionLifetimeLimitSeconds (= 60 seconds by default). In testing the transactionLifetimeLimitSeconds server parameter is set to 24 hours to catch cases where a transaction is unintentionally &quot;leaked&quot; by the system. While the system has liveness through the PeriodicThreadToAbortExpiredTransactions job, a stall would be undesirable to have happen in production.&lt;/p&gt;

&lt;p&gt;One place in testing we&apos;ve seen show up where new transactions are being started while the mongos process is shutting down is with the ClusterServerParameterRefresher thread reading from the config server primary in a multi&amp;#45;statement transaction. The MODE&amp;#95;IX lock held on the config server primary prevents the testing infrastructure from running its data consistency checks before shutting down the config server replica set. One idea to improve implicitlyAbortAllTransactions() is to set a flag on the SessionCatalog indicating process shutdown has begun. TransactionRouter instances which are obtained from the SessionCatalog can check whether this flag has been set and throw an InterruptedAtShutdown or equivalent error to prevent the mongos process from starting any new transactions.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2355291">SERVER-77667</key>
            <summary>Prevent mongos from starting new transactions at shutdown</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="13201">Fixed</resolution>
                                        <assignee username="wenqin.ye@mongodb.com">Wenqin Ye</assignee>
                                    <reporter username="max.hirschhorn@mongodb.com">Max Hirschhorn</reporter>
                        <labels>
                            <label>sharding-nyc-subteam3</label>
                    </labels>
                <created>Wed, 31 May 2023 21:34:05 +0000</created>
                <updated>Tue, 16 Jan 2024 16:06:25 +0000</updated>
                            <resolved>Wed, 10 Jan 2024 18:14:12 +0000</resolved>
                                                    <fixVersion>7.2.1</fixVersion>
                    <fixVersion>7.3.0-rc0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="6008498" author="xgen-internal-githook" created="Fri, 12 Jan 2024 20:48:25 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Wenqin Ye&apos;, &apos;email&apos;: &apos;wenqin908@gmail.com&apos;, &apos;username&apos;: &apos;wenqinYe&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77667&quot; title=&quot;Prevent mongos from starting new transactions at shutdown&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-77667&quot;&gt;&lt;del&gt;SERVER-77667&lt;/del&gt;&lt;/a&gt;: Prevent mongos from starting new transactions at shutdown&lt;br/&gt;
Branch: v7.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4eff4f8ec43badf02328a8a598e9ea4747fac226&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4eff4f8ec43badf02328a8a598e9ea4747fac226&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5998042" author="xgen-internal-githook" created="Tue, 9 Jan 2024 18:08:40 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Wenqin&apos;, &apos;email&apos;: &apos;wenqinYe@users.noreply.github.com&apos;, &apos;username&apos;: &apos;wenqinYe&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-77667&quot; title=&quot;Prevent mongos from starting new transactions at shutdown&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-77667&quot;&gt;&lt;del&gt;SERVER-77667&lt;/del&gt;&lt;/a&gt;: Prevent mongos from starting new transactions at shutdown (#17886)&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: 9d3e5e69b0623a89e357e2ed0967b9011ca8f74c&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/fdd105b625ffb52cfd1747776c9b62733cd62eeb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/fdd105b625ffb52cfd1747776c9b62733cd62eeb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5465628" author="max.hirschhorn@10gen.com" created="Wed, 31 May 2023 21:34:49 +0000"  >&lt;p&gt;Relatedly, we should consider whether mongod shutdown would benefit from logic similar to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1890163b897b74601ca1c8fec3fe7dca6b8f82de/src/mongo/s/mongos_main.cpp#L204&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;implicitlyAbortAllTransactions() from mongos&amp;#95;main.cpp&lt;/a&gt;. I can imagine we would move this logic from mongos&amp;#95;main.cpp into something common between mongos and a router&amp;#45;mongod process as part of PM-635. Yet it may also that the introduction of internal transactions and mongod already being able to act as a router means there&apos;d be benefit in earlier binVersions as well. CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=antonio.fuschetto%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;antonio.fuschetto@mongodb.com&quot;&gt;antonio.fuschetto@mongodb.com&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26583"><![CDATA[Cluster Scalability]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="26553"><![CDATA[v7.2]]></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>Tue, 29 Aug 2023 22:24:27 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 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>dbeng-pm-bot</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>135.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
            <customfieldvalue>wenqin.ye@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i2bo4f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrfs71:oi</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7991">Cluster Scalability 2024-1-8</customfieldvalue>
    <customfieldvalue id="7992">Cluster Scalability 2024-1-22</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</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|i2ba9r:</customfieldvalue>

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