<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:50:18 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-38876] Ensure secondary user operations cannot abort transactions being applied from the oplog</title>
                <link>https://jira.mongodb.org/browse/SERVER-38876</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If a user attempts to use a Session on a secondary for an operation that accepts a transaction number, that operation will check out the session. If the transaction number is greater than one in use by a secondary oplog application thread for the same session, then it could abort that secondary oplog application transaction. This could lead to a crash or data corruption. &lt;/p&gt;

&lt;p&gt;One way to fix this could be to prevent user operations on secondaries from checking out a session. Transactions and retryable writes are not allowed on secondaries, so this should be fine (an exception can be made for testing, though would maybe cause test failures). &lt;/p&gt;

&lt;p&gt;Alternatively reads outside of a transaction could be prevented from checking out a session since writes are already prevented on secondaries and secondary transactions are already prevented except for in test mode.&lt;/p&gt;</description>
                <environment></environment>
        <key id="667152">SERVER-38876</key>
            <summary>Ensure secondary user operations cannot abort transactions being applied from the oplog</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="esha.maharishi@mongodb.com">Esha Maharishi</assignee>
                                    <reporter username="judah.schvimer@mongodb.com">Judah Schvimer</reporter>
                        <labels>
                            <label>prepare_errors</label>
                    </labels>
                <created>Mon, 7 Jan 2019 21:15:10 +0000</created>
                <updated>Sun, 29 Oct 2023 22:25:20 +0000</updated>
                            <resolved>Thu, 21 Mar 2019 00:46:29 +0000</resolved>
                                                    <fixVersion>4.1.10</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2186874" author="xgen-internal-githook" created="Thu, 21 Mar 2019 00:45:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Esha Maharishi&apos;, &apos;username&apos;: &apos;EshaMaharishi&apos;, &apos;email&apos;: &apos;esha.maharishi@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-38876&quot; title=&quot;Ensure secondary user operations cannot abort transactions being applied from the oplog&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-38876&quot;&gt;&lt;del&gt;SERVER-38876&lt;/del&gt;&lt;/a&gt; Ensure secondary user operations cannot abort transactions being applied from the oplog&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9614d52c9e83afdde0ae22e16de97f290a08c206&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9614d52c9e83afdde0ae22e16de97f290a08c206&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2136749" author="esha.maharishi@10gen.com" created="Mon, 4 Feb 2019 16:40:22 +0000"  >&lt;p&gt;Per offline conversation with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=judah.schvimer&quot; class=&quot;user-hover&quot; rel=&quot;judah.schvimer&quot;&gt;judah.schvimer&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-39139&quot; title=&quot;Remove testing support for secondary transactions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-39139&quot;&gt;&lt;del&gt;SERVER-39139&lt;/del&gt;&lt;/a&gt; will be implemented to ban the behavior described by this ticket, and the work for this ticket will be to add a test that ensures the ban works as expected for this case.&lt;/p&gt;</comment>
                            <comment id="2125672" author="judah.schvimer" created="Thu, 24 Jan 2019 13:11:51 +0000"  >&lt;blockquote&gt;
&lt;p&gt;meaning it&apos;s only possible for this to occur if secondary oplog application can check a Session back in with a transaction in progress.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is due to &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1176ad66100c69d9a612682a4dac1c7fa2d2344c/src/mongo/db/transaction_participant.cpp#L1711-L1714&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this uassert&lt;/a&gt; for if the transaction is prepared, correct?&lt;/p&gt;

&lt;p&gt;If so, then I think the invariant created by &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; should cover this. Do you agree? I feel like it&apos;s worth adding a test for this case though as well.&lt;/p&gt;</comment>
                            <comment id="2124941" author="esha.maharishi@10gen.com" created="Wed, 23 Jan 2019 23:03:32 +0000"  >&lt;p&gt;My understanding is that this:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;If the transaction number is greater than one in use by a secondary oplog application thread for the same session, then it could abort that secondary oplog application transaction.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;would happen because TransactionParticipant::beginOrContinue for the request with the higher transaction number &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1176ad66100c69d9a612682a4dac1c7fa2d2344c/src/mongo/db/transaction_participant.cpp#L1721&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;could result in calling TransactionParticipant::_abortTransactionOnSession&lt;/a&gt;&#160;through TransactionParticipant::_setNewTxnNumber (for either a &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1176ad66100c69d9a612682a4dac1c7fa2d2344c/src/mongo/db/transaction_participant.cpp#L349&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;retryable write&lt;/a&gt;&#160;or &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1176ad66100c69d9a612682a4dac1c7fa2d2344c/src/mongo/db/transaction_participant.cpp#L389&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;transaction&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;However, it&apos;s only possible to reach TransactionParticipant::beginOrContinue under a checked out session, meaning it&apos;s only possible for this to occur if secondary oplog application can check a Session back in with a transaction in progress.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="610864">SERVER-37348</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="676205">SERVER-39139</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>4.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_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>Wed, 23 Jan 2019 23:03:32 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 47 weeks 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-37348'>SERVER-37348</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-39139'>SERVER-39139</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, 47 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huiggf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr7pef:</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="2787">Sharding 2019-02-25</customfieldvalue>
    <customfieldvalue id="2825">Sharding 2019-03-25</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|hui2pr:</customfieldvalue>

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