<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:45:44 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-37348] TransactionReaper and periodic transaction abort thread shouldn&apos;t abort transactions on secondaries</title>
                <link>https://jira.mongodb.org/browse/SERVER-37348</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Periodic transaction killer kills unprepared transactions that run longer than 60 seconds. It shouldn&apos;t kill transactions on secondaries. Currently, it&apos;s very unlikely to have transactions in &quot;kInProgress&quot; state longer than 60 seconds on secondaries since such transactions become prepared right after applying all their write operations; this will be more likely when we start to support transactions consisting of multiple oplog entries.&lt;/p&gt;

&lt;p&gt;Session reaper and other periodic threads may have the same issue and need auditing.&lt;/p&gt;</description>
                <environment></environment>
        <key id="610864">SERVER-37348</key>
            <summary>TransactionReaper and periodic transaction abort thread shouldn&apos;t abort transactions on secondaries</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="matthew.saltz@mongodb.com">Matthew Saltz</assignee>
                                    <reporter username="siyuan.zhou@mongodb.com">Siyuan Zhou</reporter>
                        <labels>
                            <label>prepare_errors</label>
                    </labels>
                <created>Thu, 27 Sep 2018 15:46:53 +0000</created>
                <updated>Sun, 29 Oct 2023 22:27:52 +0000</updated>
                            <resolved>Mon, 25 Feb 2019 23:03:12 +0000</resolved>
                                                    <fixVersion>4.1.9</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="2162387" author="xgen-internal-githook" created="Mon, 25 Feb 2019 22:51:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matthew Saltz&apos;, &apos;username&apos;: &apos;saltzm&apos;, &apos;email&apos;: &apos;matthew.saltz@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-37348&quot; title=&quot;TransactionReaper and periodic transaction abort thread shouldn&amp;#39;t abort transactions on secondaries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-37348&quot;&gt;&lt;del&gt;SERVER-37348&lt;/del&gt;&lt;/a&gt; Make replication applier batches uninterruptible&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/35372c0918d1e6e15cc95ecc2883c080c1b198dc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/35372c0918d1e6e15cc95ecc2883c080c1b198dc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2119312" author="matthew.saltz" created="Thu, 17 Jan 2019 22:45:13 +0000"  >&lt;p&gt;Things to do for this ticket (per discussion):&lt;br/&gt;
1. Make secondary oplog application batches uninterruptible. Since the session remains checked out while &lt;b&gt;all&lt;/b&gt; of a transaction&apos;s operations are applied and the transaction is put into prepare, TransactionParticipants should never be accessible in an unprepared state to other operations, so this should be sufficient for preventing transactions from being aborted on secondaries. &lt;br/&gt;
2. Add invariant when checking the session back in on secondaries that the transaction participant is not in progress.&lt;br/&gt;
3. Add test that the periodic transaction abort thread can&apos;t kill a transaction that&apos;s stalled in secondary oplog application of the prepare oplog entry.&lt;/p&gt;</comment>
                            <comment id="2118925" author="judah.schvimer" created="Thu, 17 Jan 2019 21:40:42 +0000"  >&lt;p&gt;Per discussion, this can be fixed by making secondary oplog application batches uninterruptible.&lt;/p&gt;</comment>
                            <comment id="2116531" author="siyuan.zhou@10gen.com" created="Wed, 16 Jan 2019 01:45:07 +0000"  >&lt;p&gt;That&apos;s an interesting idea. If we mark transactions in secondary mode, we need to do that whenever we enter secondary mode, unmark it on stepup. Instead, we can enable the transaction reaper on stepup and disable it on stepdown, like what we did for migration manager, assuming the lifecycle of  a transaction is entirely managed by the primary (which I believe is true). The transactions for dbhash allowed on secondaries may make things different. Probably, we just leave them alone, since they are not allowed in production?&lt;/p&gt;

&lt;p&gt;For the transaction reaper, another option is to let it run all the time, but check whether we are master before killing anything under the RSTL lock.&lt;/p&gt;

&lt;p&gt;However, the lifecycle of session isn&apos;t very clear to me. I have an impression that it is orthogonal to transactions and can be used for other purposes on both primary and secondary, but it actually cleans up the session / transaction participant and writes into the transaction table, which affects the lifecycle of a transaction. I guess sharding team can shed some light on that.&lt;/p&gt;</comment>
                            <comment id="2116077" author="matthew.saltz" created="Tue, 15 Jan 2019 19:15:37 +0000"  >&lt;p&gt;Is it true generally speaking that we don&apos;t want to be able to kill a transaction at all that&apos;s on a secondary? I&apos;m wondering if it would make sense if, when we start a transaction on the secondary &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d03e38b3766207db9dd8e1fb1c4bc40c9446df31/src/mongo/db/repl/apply_ops.cpp#L299&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;, we tag the transaction as unkillable due to being on a secondary (or something like that).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="584973">SERVER-36483</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="584977">SERVER-36485</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="639674">SERVER-38297</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="667152">SERVER-38876</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="639674">SERVER-38297</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="730211">SERVER-40487</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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</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, 15 Jan 2019 19:15:37 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 50 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/WRITING-3216'>WRITING-3216</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-36483'>SERVER-36483</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-36485'>SERVER-36485</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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1032</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>
                            4 years, 50 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>matthew.saltz@mongodb.com</customfieldvalue>
            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu90rz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htzfc7:</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="2726">Sharding 2019-01-28</customfieldvalue>
    <customfieldvalue id="2786">Sharding 2019-02-11</customfieldvalue>
    <customfieldvalue id="2787">Sharding 2019-02-25</customfieldvalue>
    <customfieldvalue id="2824">Sharding 2019-03-11</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|hu8n1b:</customfieldvalue>

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