<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:02:21 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-4541] Java driver returns wrong error code in retryable write</title>
                <link>https://jira.mongodb.org/browse/JAVA-4541</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;ol&gt;
	&lt;li&gt;Do a replaceOne for a document and have the server return a NotWritablePrimary error.&lt;/li&gt;
	&lt;li&gt;When the driver retries, have it hang waiting for write concern&lt;/li&gt;
	&lt;li&gt;Kill (-9) the server being retried on.&lt;/li&gt;
	&lt;li&gt;Error returned is &lt;tt&gt;com.mongodb.MongoNotPrimaryException&lt;/tt&gt;, indicating the replace didn&apos;t happen, though in fact it may have.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;If &lt;tt&gt;findOneAndReplace&lt;/tt&gt; is used instead of &lt;tt&gt;replaceOne&lt;/tt&gt;, a&#160;&lt;tt&gt;MongoSocketReadException&lt;/tt&gt; is returned instead.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2005924">JAVA-4541</key>
            <summary>Java driver returns wrong error code in retryable write</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="13202">Works as Designed</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="matthew.russotto@mongodb.com">Matthew Russotto</reporter>
                        <labels>
                            <label>internal-user</label>
                    </labels>
                <created>Mon, 21 Mar 2022 20:18:56 +0000</created>
                <updated>Fri, 27 Oct 2023 13:20:53 +0000</updated>
                            <resolved>Fri, 25 Mar 2022 20:26:22 +0000</resolved>
                                    <version>3.12.10</version>
                    <version>4.3.4</version>
                                                    <component>Write Operations</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4436261" author="jeff.yemin" created="Fri, 25 Mar 2022 20:26:22 +0000"  >&lt;p&gt;The driver works as expected in the 4.5.1 release, so closing this out.&lt;/p&gt;</comment>
                            <comment id="4425205" author="jeff.yemin" created="Mon, 21 Mar 2022 20:49:14 +0000"  >&lt;p&gt;Spec quote that may be relevant:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;If the retry attempt also fails, drivers MUST update their topology according to the SDAM spec (see:&#160;&lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#error-handling&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Error Handling&lt;/a&gt;). If an error would not allow the caller to infer that an attempt was made (e.g. connection pool exception originating from the driver), the original error should be raised. If the retry failed due to another retryable error or some other error originating from the server, that error should be raised instead as the caller can infer that an attempt was made and the second error is likely more relevant (with respect to the current topology state).&lt;/p&gt;&lt;/blockquote&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="368652" name="java4541_451_debug_log.txt" size="23413" author="matthew.russotto@mongodb.com" created="Fri, 25 Mar 2022 20:18:05 +0000"/>
                            <attachment id="367587" name="java4541_debug_log.txt" size="24916" author="matthew.russotto@mongodb.com" created="Tue, 22 Mar 2022 15:11:43 +0000"/>
                    </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i070mc:</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>