<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:03:48 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>[JAVA-5125] Some write concern errors are not retried according to spec</title>
                <link>https://jira.mongodb.org/browse/JAVA-5125</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-5124&quot; title=&quot;Ensure retryable writes tests execute on non-replica sets&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-5124&quot;&gt;&lt;del&gt;JAVA-5124&lt;/del&gt;&lt;/a&gt; was opened because the legacy retryable writes test suite was not being run against sharded clusters.  After that issue was addressed it was observed that tests of write concern error retryability fail on 4.2 and 4.4 sharded clusters.  The tests that fail mostly have description ending with &quot;succeeds after WriteConcernError ShutdownInProgress&quot;, although there are a few other failures as well.&lt;/p&gt;

&lt;p&gt;While attempting to debug these test failures, the following observations were made:&lt;/p&gt;

&lt;p&gt;1. Clusters starting with 5.0 include a RetryableWriteError error label, which is likely what&apos;s causing the driver to take a different code path and succeed on newer server releases&lt;br/&gt;
2. Although the failpoint in the tests specify that error code 91 be returned, 4.2 and 4.4 sharded cluster actually return error code 6.  Moreover, there is specific branching code in the driver relating to error code 91.  &lt;br/&gt;
3. A 4.2 replica set also does not include the RetryableWriteError error label, but it does return the expected error code of 91.  The test succeeds on a 4.2 replica set.&lt;/p&gt;

&lt;p&gt;This looks like a bug.  The reason that the tests pass in the other variants is due to the specific error code used in the test: 91.  Because of this, &lt;tt&gt;ProtocolHelper#createSpecialException&lt;/tt&gt; returns a &lt;tt&gt;MongoNodeIsRecoveringException} which is then thrown.  But with error code 6, {{ProtocolHelper#createSpecialException&lt;/tt&gt; returns null, no exception is thrown, and the retry logic doesn&apos;t execute.  So the fact that 4.2 and 4.4 sharded clusters, for some reason, are incorrectly returning error code 6 instead of 91 due to the failpoint, the bug is exposed.  The retryable writes spec clearly intends that error code 6 in a write concern error should cause a RetryableWriteError to be added, yet it is not. It&apos;s simple to demonstrate this by just changing the 91 to 6 in the tests, and they will fail in all configurations.&lt;/p&gt;

&lt;p&gt;The plan for &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-5124&quot; title=&quot;Ensure retryable writes tests execute on non-replica sets&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-5124&quot;&gt;&lt;del&gt;JAVA-5124&lt;/del&gt;&lt;/a&gt; is to enable these tests for sharded clusters, but modify the test files to exclude then for server releases below 5.0.  Once this issue is addressed, the tests can go back to the way they are in the original specification.&lt;/p&gt;


</description>
                <environment></environment>
        <key id="2430404">JAVA-5125</key>
            <summary>Some write concern errors are not retried according to spec</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 30 Aug 2023 17:07:41 +0000</created>
                <updated>Wed, 10 Jan 2024 23:20:56 +0000</updated>
                                                                            <component>Retryability</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="5672333" author="xgen-internal-githook" created="Thu, 31 Aug 2023 15:40:24 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@mongodb.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: Remove incorrect test-skipping logic (#1186)&lt;/p&gt;

&lt;p&gt;Skip newly-running but failing tests in code&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-5124&quot; title=&quot;Ensure retryable writes tests execute on non-replica sets&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-5124&quot;&gt;&lt;del&gt;JAVA-5124&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-5125&quot; title=&quot;Some write concern errors are not retried according to spec&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-5125&quot;&gt;JAVA-5125&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/d08adffbf9837abad78029af1fcd1dfb60ff8dde&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/d08adffbf9837abad78029af1fcd1dfb60ff8dde&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2429395">JAVA-5124</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY24Q3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr1d6r:2i7</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>