<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:55:15 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-62479] [Retryability] Investigate the lifetime of TransactionParticipants stored in RetryableTransactionParticipantCatalog</title>
                <link>https://jira.mongodb.org/browse/SERVER-62479</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62020&quot; title=&quot;[Retryability] Make retryable write statements executed with or without internal transactions retryable whether or not internal transactions are involved on retries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62020&quot;&gt;&lt;del&gt;SERVER-62020&lt;/del&gt;&lt;/a&gt; introduced execution history check across external/parent session and its internal/child sessions. It introduced the notion of RetryableTransactionParticipantCatalog which exists as a decoration on the Session object for the external session. The catalog stores to the TransactionParticipant:Participants for any active retryable write on the session, and allows for cross-session write history lookup and state validation. This ticket is to investigate whether the those TransactionParticipant:Participants can become invalid given that the lifetime of&#160;each TransactionParticipant object is tied to that of its owning Session. Preliminary investigation suggests that this can occur after the external session/transactions expire. Below is the reasoning.&#160;&lt;/p&gt;

&lt;p&gt;When we check out a child Session, we update both the lastCheckOut time of that child Session and the lastCheckOut time of its parent Session. Therefore, a parent Session can only become expired after all of its Child sessions have expired, which is TransactionRecordMinimumLifetimeMinutes (defaults to 30) after its children or itself was last checked out, and its config.system.sessions doc is guaranteed to exist as long as it hasn&apos;t been more than localLogicalSessionTimeoutMinutes (defaults to 30) since the last checkout time. Additionally,&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-59506&quot; title=&quot;Ensure that config.transactions and config.image_collection entries for child sessions are only reaped when their parent sessions are reaped&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-59506&quot;&gt;&lt;del&gt;SERVER-59506&lt;/del&gt;&lt;/a&gt;&#160;made it such that &lt;a href=&quot;https://github.com/mongodb/mongo/blob/a7769499d4f46deb5c52cacad15c499a70e42683/src/mongo/db/sessions_collection.cpp#L271-L283&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;child Sessions are only reaped when the parent Session is reaped&lt;/a&gt;, which can only occur after the config.system.sessions entry for its parent session no longer exists (i.e. deleted by the TTL monitor). The removal of those Sessions is done &lt;a href=&quot;https://github.com/mongodb/mongo/blob/bf7adca3bd56959f320eccb610668fe21c196243/src/mongo/db/session_catalog.cpp#L223&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;atomically while holding the SessionCatlog mutex&lt;/a&gt;. Despite this, the lifetime of child Sessions is not completely tied that of the parent Session because:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;_shouldBeReaped() returns false if the Session is still checked out by some opCtx.&lt;/li&gt;
	&lt;li&gt;The destruction of the SessionRuntimeInfo&apos;s (i.e. Sessions) occurs asynchronously after scanSessions() returns.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Therefore, if there is a session that is checked out by some opCtx when reaping occurs, that TransactionParticipant for that session will outlive the remaining TransactionParticipants in the catalog. This ticket is to verify this hypothesis through a test and find a solution for the issue if required.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1961195">SERVER-62479</key>
            <summary>[Retryability] Investigate the lifetime of TransactionParticipants stored in RetryableTransactionParticipantCatalog</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="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="cheahuychou.mao@mongodb.com">Cheahuychou Mao</assignee>
                                    <reporter username="cheahuychou.mao@mongodb.com">Cheahuychou Mao</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Jan 2022 18:32:34 +0000</created>
                <updated>Sun, 29 Oct 2023 21:44:20 +0000</updated>
                            <resolved>Wed, 13 Apr 2022 20:59:08 +0000</resolved>
                                                    <fixVersion>6.0.0-rc1</fixVersion>
                    <fixVersion>6.1.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4488380" author="xgen-internal-githook" created="Mon, 18 Apr 2022 16:13:00 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Cheahuychou Mao&apos;, &apos;email&apos;: &apos;mao.cheahuychou@gmail.com&apos;, &apos;username&apos;: &apos;cheahuychou&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62479&quot; title=&quot;[Retryability] Investigate the lifetime of TransactionParticipants stored in RetryableTransactionParticipantCatalog&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62479&quot;&gt;&lt;del&gt;SERVER-62479&lt;/del&gt;&lt;/a&gt; Reap sessions for the same retryable write atomically&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 87393ce9bcfe06f8aa93b856474fb77bfb3a5267)&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/845602af9c2f05f33fe03ec4f0b49f843bb81740&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/845602af9c2f05f33fe03ec4f0b49f843bb81740&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4481685" author="xgen-internal-githook" created="Wed, 13 Apr 2022 20:53:41 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Cheahuychou Mao&apos;, &apos;email&apos;: &apos;mao.cheahuychou@gmail.com&apos;, &apos;username&apos;: &apos;cheahuychou&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-62479&quot; title=&quot;[Retryability] Investigate the lifetime of TransactionParticipants stored in RetryableTransactionParticipantCatalog&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-62479&quot;&gt;&lt;del&gt;SERVER-62479&lt;/del&gt;&lt;/a&gt; Reap sessions for the same retryable write atomically&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/87393ce9bcfe06f8aa93b856474fb77bfb3a5267&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/87393ce9bcfe06f8aa93b856474fb77bfb3a5267&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2023508">SERVER-65496</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2023626">SERVER-65505</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23470"><![CDATA[v6.0]]></customfieldvalue>
    <customfieldvalue key="23140"><![CDATA[v5.3]]></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, 8 Feb 2022 19:24:44 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 42 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_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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2210</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>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, 42 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>65.0</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hzzj93:</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="5728">Sharding 2022-02-07</customfieldvalue>
    <customfieldvalue id="5729">Sharding 2022-02-21</customfieldvalue>
    <customfieldvalue id="5730">Sharding 2022-03-07</customfieldvalue>
    <customfieldvalue id="5731">Sharding NYC 2022-03-21</customfieldvalue>
    <customfieldvalue id="5732">Sharding NYC 2022-04-04</customfieldvalue>
    <customfieldvalue id="5733">Sharding NYC 2022-04-18</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|i0g0d3:</customfieldvalue>

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