<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:40:45 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-35730] Assert replica set transactions cannot fail to commit their WriteUnitOfWork rather than abort</title>
                <link>https://jira.mongodb.org/browse/SERVER-35730</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When we try to commit a single replica set transaction, we call &lt;tt&gt;commit&lt;/tt&gt; on its underlying &lt;tt&gt;WriteUnitOfWork&lt;/tt&gt;. If this commit call fails, we will then &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1871507cdbdd492abee785076203467d20e0e716/src/mongo/db/session.cpp#L977-L984&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mark the transaction as aborted&lt;/a&gt;. We currently don&apos;t have any unit or integration tests that exercise this case. We could consider testing this by simply mocking out a behavior of the OperationContext so that we throw an exception before we &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1871507cdbdd492abee785076203467d20e0e716/src/mongo/db/session.cpp#L994&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;set the committed flag to true&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="562667">SERVER-35730</key>
            <summary>Assert replica set transactions cannot fail to commit their WriteUnitOfWork rather than abort</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="judah.schvimer@mongodb.com">Judah Schvimer</assignee>
                                    <reporter username="william.schultz@mongodb.com">William Schultz</reporter>
                        <labels>
                            <label>prepare_testing</label>
                    </labels>
                <created>Thu, 21 Jun 2018 19:31:24 +0000</created>
                <updated>Sun, 29 Oct 2023 22:30:32 +0000</updated>
                            <resolved>Fri, 21 Sep 2018 19:45:13 +0000</resolved>
                                                    <fixVersion>4.1.4</fixVersion>
                                    <component>Replication</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="2010893" author="xgen-internal-githook" created="Fri, 21 Sep 2018 19:44:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Judah Schvimer&apos;, &apos;email&apos;: &apos;judah@mongodb.com&apos;, &apos;username&apos;: &apos;judahschvimer&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35865&quot; title=&quot;Write commit oplog entry on commit of prepared transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35865&quot;&gt;&lt;del&gt;SERVER-35865&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35816&quot; title=&quot;Ensure the commit optime is less than or equal to the optime of the commitTransaction oplog entry&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35816&quot;&gt;&lt;del&gt;SERVER-35816&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35730&quot; title=&quot;Assert replica set transactions cannot fail to commit their WriteUnitOfWork rather than abort&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35730&quot;&gt;&lt;del&gt;SERVER-35730&lt;/del&gt;&lt;/a&gt; Write commit oplog entry on commit of prepared transaction&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/340e33483d69983c976dff0ed5ab2ff0b036237c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/340e33483d69983c976dff0ed5ab2ff0b036237c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2002988" author="judah.schvimer" created="Fri, 14 Sep 2018 14:02:29 +0000"  >&lt;p&gt;This ticket will be committed in the same patch as &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35865&quot; title=&quot;Write commit oplog entry on commit of prepared transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35865&quot;&gt;&lt;del&gt;SERVER-35865&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1995764" author="siyuan.zhou@10gen.com" created="Thu, 6 Sep 2018 20:53:21 +0000"  >&lt;p&gt;Talked with Dan, I confirmed that WiredTiger detects write conflict on write time rather than commit time, so we expect&#160;&lt;tt&gt;commit()&lt;/tt&gt; to succeed unless there are some fatal failures. If there&apos;s another storage engine that detects write conflicts on commit, we may need to prepare for that, but this issue won&apos;t be the only surprise for us. Thus I&apos;m changing the ticket to remove the &lt;tt&gt;abortGuard&lt;/tt&gt;&#160;to reflect the real contract.&lt;/p&gt;</comment>
                            <comment id="1976810" author="siyuan.zhou@10gen.com" created="Wed, 15 Aug 2018 20:09:48 +0000"  >&lt;p&gt;I agree it&apos;s nice to assume&#160;storage engine can throw a WCE on&#160;on an unprepared&#160;&lt;tt&gt;WUOW.commit&lt;/tt&gt;, but we cannot test the exception handling code properly in that way. If we decide to keep the current behavior not to throw, I&apos;d suggest changing the title of this ticket to remove the exception handling code.&lt;/p&gt;</comment>
                            <comment id="1975829" author="daniel.gottlieb@10gen.com" created="Tue, 14 Aug 2018 20:03:19 +0000"  >&lt;p&gt;Welp, I also thought the WUOW.commit method could &lt;a href=&quot;https://github.com/mongodb/mongo/blob/d054cd1149acb76830fff466ef3bb234741b5a46/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp#L277&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;throw a WCE if WT&apos;s commit&lt;/a&gt; returned &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4028ee62650cde8be1409ffe54bd4d40328c241c/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp#L60-L62&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;WT_ROLLBACK&lt;/tt&gt;&lt;/a&gt;, but &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=william.schultz&quot; class=&quot;user-hover&quot; rel=&quot;william.schultz&quot;&gt;william.schultz&lt;/a&gt;&apos;s linked code certainly catches that and decides to terminate. Terminating when WT fails to commit (as opposed to only terminating with the registered changes throw an exception) seems to date back to WT&apos;s introduction in 3.0.&lt;/p&gt;

&lt;p&gt;From a hypothetical API perspective, I would say a storage engine can throw a WCE on an unprepared &lt;tt&gt;WUOW.commit&lt;/tt&gt; and catching a WCE implies the &quot;rollback&quot; changes were processed successfully. However, unsurprisingly, a storage engine must succeed in committing a prepared transaction. But confirming what the WT code does today and in 4.0, I don&apos;t see a WCE ever escaping a WUOW.commit call.&lt;/p&gt;</comment>
                            <comment id="1975786" author="siyuan.zhou@10gen.com" created="Tue, 14 Aug 2018 19:32:50 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=geert.bosch&quot; class=&quot;user-hover&quot; rel=&quot;geert.bosch&quot;&gt;geert.bosch&lt;/a&gt; and&#160;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=daniel.gottlieb&quot; class=&quot;user-hover&quot; rel=&quot;daniel.gottlieb&quot;&gt;daniel.gottlieb&lt;/a&gt;, as Will mentioned earlier, &lt;tt&gt;commit()&lt;/tt&gt; seems to treat all errors on commit as fatal, but I remembered the assumption in 4.0 was &lt;tt&gt;commit()&lt;/tt&gt; can throw for unprepared transactions. Could you please confirm whether &lt;tt&gt;commit()&lt;/tt&gt; can throw for both unprepared and prepared transactions?&lt;/p&gt;</comment>
                            <comment id="1975762" author="william.schultz" created="Tue, 14 Aug 2018 19:19:17 +0000"  >&lt;p&gt;I think this is still worthwhile to test, even with new changes being made as part of prepare work. &lt;a href=&quot;https://github.com/mongodb/mongo/blob/9554bfa400f25347c98aa983535224734db8bfa0/src/mongo/db/transaction_participant.cpp#L673-L676&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;This&lt;/a&gt; is the relevant code block to execute now. &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; I am moving it into the prepare epic with a &quot;testing&quot; label. Writing a unit test that simulates an exception being thrown by &lt;tt&gt;WriteUnitOfWork::commit&lt;/tt&gt; should probably suffice.&lt;/p&gt;</comment>
                            <comment id="1928151" author="william.schultz" created="Thu, 21 Jun 2018 20:15:49 +0000"  >&lt;p&gt;Although the current implementation of WiredTiger commit may treat all errors as fatal, this is not a generic behavior that should be relied upon for code calling into the storage engine. It should be expected that a call to commit may fail (throw an exception), and so calling code should be robust to this. Thus, the code block mentioned in the previous comment should be retained, and it could be valuable to test it.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="565176">SERVER-35865</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.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>Tue, 14 Aug 2018 19:32:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 20 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_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>
                            5 years, 20 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>daniel.gottlieb@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>judah.schvimer@mongodb.com</customfieldvalue>
            <customfieldvalue>siyuan.zhou@mongodb.com</customfieldvalue>
            <customfieldvalue>william.schultz@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu16br:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htvqin:</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="2448">Repl 2018-08-27</customfieldvalue>
    <customfieldvalue id="2483">Repl 2018-09-10</customfieldvalue>
    <customfieldvalue id="2484">Repl 2018-09-24</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|hu0sl3:</customfieldvalue>

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