<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:24:54 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>[DRIVERS-2169] Transaction test expectation contrary to retryable write requirements</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-2169</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;p&gt;The &quot;commitTransaction retry fails on new mongos&quot; test in &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/transactions/tests/mongos-recovery-token.yml#L177&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/transactions/tests/mongos-recovery-token.yml#L177&lt;/a&gt; performs two commitTransaction operations; the first one is failed with a socket error via a fail point, the second one fails with an OperationFailure. The test expects the second failing operation to have a transient error label, however as far as I can tell this is contrary to retryable writes spec requirements per  &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.rst#executing-retryable-write-commands&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.rst#executing-retryable-write-commands&lt;/a&gt;, which require that a non-socket error, non-not master error causes the &lt;b&gt;original&lt;/b&gt; failure to be reraised rather than propagating the retry failure, specifically the following bit of pseudocode:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; } catch (DriverException ignoredError) {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;   throw originalError;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;In case of the commit test in question, the original error has the unknown result label, and the retried error has the transient label. The test as currently written expects the error to have the transient label, implicitly requiring that the retried error is propagated, but in Ruby the test produces an exception with the unknown result label, indicating that the original error was propagated.&lt;/p&gt;

&lt;p&gt;Looking at Python driver which is the reference implementation for transactions, my impression is it always raises the last OperationFailure encountered when doing write retries, and hence would raise the last error contrary to the pseudocode quoted above. The relevant spec change for raising original error is &lt;a href=&quot;https://github.com/mongodb/specifications/commit/84f0fb9043e7bf2b04e74c9072f56013a97a5073&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/84f0fb9043e7bf2b04e74c9072f56013a97a5073&lt;/a&gt;&lt;br/&gt;
&#65532;&lt;/p&gt;


&lt;p&gt;Since error details were requested in slack, I am providing them below.&lt;/p&gt;

&lt;p&gt;first error:&lt;/p&gt;

&lt;p&gt;[#&amp;lt;Mongo::Error::SocketError: EOFError: end of file reached (for 127.0.0.1:27571 (no TLS))&amp;gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;UnknownTransactionCommitResult&amp;quot;&amp;#93;&lt;/span&gt;]&lt;/p&gt;

&lt;p&gt;second error:&lt;/p&gt;

&lt;p&gt;[#&amp;lt;Mongo::Error::OperationFailure: Recovering the transaction&apos;s outcome found the transaction aborted (251)&amp;gt;, &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;TransientTransactionError&amp;quot;&amp;#93;&lt;/span&gt;]&lt;/p&gt;
</description>
                <environment></environment>
        <key id="808692">DRIVERS-2169</key>
            <summary>Transaction test expectation contrary to retryable write requirements</summary>
                <type id="14901" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14700&amp;avatarType=issuetype">Spec Change</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="oleg.pudeyev@mongodb.com">Oleg Pudeyev</reporter>
                        <labels>
                    </labels>
                <created>Wed, 19 Jun 2019 21:49:06 +0000</created>
                <updated>Thu, 31 Mar 2022 14:21:45 +0000</updated>
                                                                <component>Transactions</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2295564" author="oleg.pudeyev" created="Mon, 24 Jun 2019 19:58:11 +0000"  >&lt;p&gt;Proposed spec test change: &lt;a href=&quot;https://github.com/mongodb/mongo-ruby-driver/pull/1360/commits/771885625148d7978075f627031d69e9ba9b9bde&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-ruby-driver/pull/1360/commits/771885625148d7978075f627031d69e9ba9b9bde&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="629369">RUBY-1561</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                            <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10748"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6kh3:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>