<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:26:15 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-2712] Retry commands that fail because of the selected server being concurrently removed from the topology</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-2712</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;div class=&quot;panel&quot; style=&quot;background-color: #fafbfc;border-color: #21313c;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;panelContent&quot; style=&quot;background-color: #fafbfc;&quot;&gt;
&lt;h3&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;What is the problem or use case, what are we trying to achieve?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As a result of &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#topologytype-table&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;SDAM&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/polling-srv-records-for-mongos-discovery/polling-srv-records-for-mongos-discovery.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;SRV records polling&lt;/a&gt;, a driver may &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#remove&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;remove&lt;/a&gt; a &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#server&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;server&lt;/a&gt; from the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#topology&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;topology&lt;/a&gt;. The &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#remove&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;SDAM spec requires the server monitor to halt as a result of removal&lt;/a&gt;. While it does not specify anything regarding the connection pool for the server, it&apos;s only reasonable to close all of its connections and make sure the pool does not create new ones. This renders the server unusable, which is a natural expectation for a server that was removed from the topology.&lt;/p&gt;

&lt;p&gt;Another observation is that a driver may try and use a removed server to execute a command: a server selected for executing a command may be concurrently removed from the topology and made unusable. Obviously, this race condition may result in the command failing (the Java driver throws &lt;tt&gt;MongoServerUnavailableException&lt;/tt&gt;). It seems reasonable to treat such a failure as retryable (see retryable &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;reads&lt;/a&gt;, &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/retryable-writes/retryable-writes.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;writes&lt;/a&gt;), or, if it happened for a change stream, &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/change-streams/change-streams.rst#resumable-error&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;resumable&lt;/a&gt;. As far as I can see, there is no specification that requires it to be treated this way. The Java driver treats &lt;tt&gt;MongoServerUnavailableException&lt;/tt&gt; as resumable, but not as retryable.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Motivation&quot;&gt;&lt;/a&gt;&lt;b&gt;Motivation&lt;/b&gt;&lt;/h3&gt;
&lt;h4&gt;&lt;a name=&quot;Whoistheaffectedenduser%3F&quot;&gt;&lt;/a&gt;Who is the affected end user?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Who are the stakeholders?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Driver users.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Howdoesthisaffecttheenduser%3F&quot;&gt;&lt;/a&gt;How does this affect the end user?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Are they blocked? Are they annoyed? Are they confused?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A user sees retryable operations not being retried in a situation when it seems reasonable to retry.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Howlikelyisitthatthisproblemorusecasewilloccur%3F&quot;&gt;&lt;/a&gt;How likely is it that this problem or use case will occur?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Main path? Edge case?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The described failure is usually less likely to happen than other kinds of failures that the specifications require to be retryable/resumable, however it still happens and users notice: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-5119&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/JAVA-5119&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Iftheproblemdoesoccur%2Cwhataretheconsequencesandhowseverearethey%3F&quot;&gt;&lt;/a&gt;If the problem does occur, what are the consequences and how severe are they?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Minor annoyance at a log message? Performance concern? Outage/unavailability? Failover can&apos;t complete?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Not severe. A user observe failures that a driver could have hidden by retrying.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Isthisissueurgent%3F&quot;&gt;&lt;/a&gt;Is this issue urgent?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Does this ticket have a required timeline? What is it?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Isthisticketrequiredbyadownstreamteam%3F&quot;&gt;&lt;/a&gt;Is this ticket required by a downstream team?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Needed by e.g. Atlas, Shell, Compass?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Isthisticketonlyfortests%3F&quot;&gt;&lt;/a&gt;Is this ticket only for tests?&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Does this ticket have any functional impact, or is it just test improvements?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;AcceptanceCriteria&quot;&gt;&lt;/a&gt;&lt;b&gt;Acceptance Criteria&lt;/b&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;What specific requirements must be met to consider the design phase complete?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We must introduce unified/prose tests for the improvement.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="2431905">DRIVERS-2712</key>
            <summary>Retry commands that fail because of the selected server being concurrently removed from the topology</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="valentin.kovalenko@mongodb.com">Valentin Kavalenka</reporter>
                        <labels>
                    </labels>
                <created>Thu, 31 Aug 2023 20:09:00 +0000</created>
                <updated>Tue, 5 Sep 2023 19:24:50 +0000</updated>
                                                                <component>Retryability</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                        <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|i26rwg:</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>