<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:23:38 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-1571] Direct read/write retries to another mongos if possible</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-1571</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;p&gt;There are several scenarios in which it would be useful to redirect reads or writes to a different mongos.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;A MongoDB sharded cluster deployment may find itself in a situation when a mongos reports itself as being healthy but is unable to execute any queries. The driver has attempted to retry the failing queries, but in a number of cases selected &lt;b&gt;the same mongos that failed in the first place&lt;/b&gt; which caused the retry to also fail (for the same reason as the original attempt) and be propagated to the application.&lt;/li&gt;
	&lt;li&gt;Currently when the driver is in sharded topology, server selection spec requires a random server to be selected for each operation. This permits the same failed mongos to be selected for both an operation and its retry, with the result that the query fails, even when there are healthy mongoses in the deployment that could have successfully executed the query.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The suggested improvement is for the driver, when in sharded cluster topology, to:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Track whether a server selection request is for the first attempt or for a retry,&lt;/li&gt;
	&lt;li&gt;Track the server used for the first attempt,&lt;/li&gt;
	&lt;li&gt;When selecting the server for the retry, if there are multiple eligible mongoses, select randomly from mongoses other than the one used for the first attempt.&lt;/li&gt;
	&lt;li&gt;bonus nice to have: determine if a mongos is healthy before making said attempt and if unhealthy, exclude from selection&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Cast of Characters: &lt;br/&gt;
Product Manager for Feature: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alex.bevilacqua%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;alex.bevilacqua@mongodb.com&quot;&gt;alex.bevilacqua@mongodb.com&lt;/a&gt;&lt;br/&gt;
Program Manager: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tom.selander%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;tom.selander@mongodb.com&quot;&gt;tom.selander@mongodb.com&lt;/a&gt;&lt;br/&gt;
Engineering Lead: &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=dmitry.rybakov%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;dmitry.rybakov@mongodb.com&quot;&gt;dmitry.rybakov@mongodb.com&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1628382">DRIVERS-1571</key>
            <summary>Direct read/write retries to another mongos if possible</summary>
                <type id="11" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14707&amp;avatarType=issuetype">Epic</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="13453" iconUrl="https://jira.mongodb.org/images/icons/status_generic.gif" description="">Implementing</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="dmitry.rybakov@mongodb.com">Dmitry Rybakov</assignee>
                                    <reporter username="oleg.pudeyev@mongodb.com">Oleg Pudeyev</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Feb 2021 13:44:34 +0000</created>
                <updated>Tue, 6 Feb 2024 17:25:10 +0000</updated>
                                                                <component>Performance</component>
                    <component>Retryability</component>
                    <component>Server Selection</component>
                                        <votes>6</votes>
                                    <watches>32</watches>
                                                                                                                <comments>
                            <comment id="5688994" author="xgen-internal-githook" created="Fri, 8 Sep 2023 08:28:09 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Dmitry Rybakov&apos;, &apos;email&apos;: &apos;dmitry.rybakov@mongodb.com&apos;, &apos;username&apos;: &apos;comandeo&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-1571&quot; title=&quot;Direct read/write retries to another mongos if possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-1571&quot;&gt;DRIVERS-1571&lt;/a&gt; Fix changelog entries (#1456)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/specifications/commit/edf51dc4fdf8bb4f4dab3f41e799a53f49c26c8e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/edf51dc4fdf8bb4f4dab3f41e799a53f49c26c8e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5660180" author="xgen-internal-githook" created="Fri, 25 Aug 2023 18:26:20 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Dmitry Rybakov&apos;, &apos;email&apos;: &apos;dmitry.rybakov@mongodb.com&apos;, &apos;username&apos;: &apos;comandeo&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-1571&quot; title=&quot;Direct read/write retries to another mongos if possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-1571&quot;&gt;DRIVERS-1571&lt;/a&gt; Retry on different mongos when possible (#1450)&lt;/p&gt;

&lt;p&gt;Co-authored-by: Alex Bevilacqua &amp;lt;alex@alexbevi.com&amp;gt;&lt;br/&gt;
Co-authored-by: Preston Vasquez &amp;lt;prestonvasquez@icloud.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/specifications/commit/86d961fee4c5e92fbcff76a62abe1aea3fafd451&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/commit/86d961fee4c5e92fbcff76a62abe1aea3fafd451&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4621474" author="jeff.yemin" created="Thu, 16 Jun 2022 17:12:52 +0000"  >&lt;p&gt;SPEC-1555 seems related to this issue, as over time that feature will help the driver to route even the initial command to a mongos that is experiencing less queuing.&lt;/p&gt;</comment>
                            <comment id="3920405" author="oleg.pudeyev" created="Wed, 7 Jul 2021 14:13:45 +0000"  >&lt;p&gt;If the question is about errors returned for &lt;b&gt;operations&lt;/b&gt;, I don&apos;t believe there is one.&lt;/p&gt;

&lt;p&gt;Server selection does not presently take into account errors that happened on a particular connection or server.  Given two mongoses in a sharded cluster, each will be equally likely to be chosen (for each new operation or retry) even if one is failing every single operation with any error code.&lt;/p&gt;


&lt;p&gt;However if the mongos responds with an error to &lt;b&gt;ismaster&lt;/b&gt; then it should be taken out of usage by the drivers.&lt;/p&gt;</comment>
                            <comment id="3630782" author="jeff.yemin" created="Tue, 23 Feb 2021 18:40:44 +0000"  >&lt;p&gt;Also, note that it will not interact well with DRIVERS-720.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="1562907">SERVER-53287</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10620">
                    <name>Issue split</name>
                                            <outwardlinks description="split to">
                                        <issuelink>
            <issuekey id="1827667">JAVA-4254</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1827665">CSHARP-3757</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1827671">PHPC-1911</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1827664">CXX-2320</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1827663">CDRIVER-4099</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1827666">GODRIVER-2101</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1827669">MOTOR-792</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1827668">NODE-3470</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1827670">PYTHON-2834</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1827672">RUBY-2748</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1827673">RUST-935</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                                                <inwardlinks description="is caused by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1449124">SERVER-50459</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2568609">DRIVERS-2828</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1813429">DRIVERS-1842</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1680982">DRIVERS-2140</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000sdvetQAA, 5002K00000sc8fmQAA, 5002K00000scR2gQAE, 5002K00000v0h9uQAA, 5006R00001lB1VdQAK, 5006R00001pm1ZCQAY, 5006R00001mftVaQAI, 5006R00001xky73QAA]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_20965" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Cost Threshold %</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>100.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_20963" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Cost to Date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_13653" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Detailed Project Statuses</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Engineer: Dmitry Rybakov&lt;br/&gt;
Summary: When encountering a retryable error, direct the retry attempt to a different mongos if possible.&lt;/p&gt;

&lt;p&gt;2023-06-23&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Design approved&lt;/li&gt;
	&lt;li&gt;Ready for implementation in Q3 with Go&lt;/li&gt;
&lt;/ul&gt;


&lt;hr /&gt;
&lt;p&gt;2023-06-09&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Design approved&lt;/li&gt;
	&lt;li&gt;Changes will be ported to spec repo&lt;/li&gt;
&lt;/ul&gt;


&lt;hr /&gt;
&lt;p&gt;2023-05-12&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Design work started&lt;/li&gt;
	&lt;li&gt;Decided against adapting unified test format to accommodate special test needs for this project due to implementation complexity involved&lt;/li&gt;
&lt;/ul&gt;
</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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Drivers should implement server selection and read/write retry mechanisms changes, as well as new prose tests: &lt;a href=&quot;https://github.com/mongodb/specifications/commit/86d961fee4c5e92fbcff76a62abe1aea3fafd451&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;specifications@86d961f&lt;/a&gt;&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10940"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_23952" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Driver Compliance</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<style type='text/css'>
         #scriptField, #scriptField *{
                border: 1px solid black;
            }

            #scriptField{
                border-collapse: collapse;
            }

            #scriptField td {
                text-align: center; /* Center-align text in table cells */
            }

            #scriptField td.key {
                text-align: left; /* Left-align text in the Key column */
            }

            #scriptField a {
                text-decoration: none; /* Remove underlines from links */
                border: none; /* Remove border from links */
            }
            
            /* Add green background color to cells with FixVersion */
            #scriptField td.hasFixVersion {
                background-color: #00FF00; /* Green color code */
            }

            /* Center-align the first row headers */
            #scriptField th {
                text-align: center;
            }
        </style>
<table id='scriptField'>
  <tr>
    <th>Key</th>
    <th>Status/Resolution</th>
    <th>FixVersion</th>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CDRIVER-4099'>CDRIVER-4099</a>
    </td>
    <td>In Code Review</td>
    <td class='hasFixVersion'>1.26.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CXX-2320'>CXX-2320</a>
    </td>
    <td>Blocked</td>
    <td class='hasFixVersion'>3.10.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/CSHARP-3757'>CSHARP-3757</a>
    </td>
    <td>Backlog</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/GODRIVER-2101'>GODRIVER-2101</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>1.13.0, 1.13.1</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/JAVA-4254'>JAVA-4254</a>
    </td>
    <td>Backlog</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/NODE-3470'>NODE-3470</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>6.4.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/MOTOR-792'>MOTOR-792</a>
    </td>
    <td>Duplicate</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PYTHON-2834'>PYTHON-2834</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>4.7</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/PHPC-1911'>PHPC-1911</a>
    </td>
    <td>Backlog</td>
    <td class=''></td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUBY-2748'>RUBY-2748</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.19.4</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/RUST-935'>RUST-935</a>
    </td>
    <td>Fixed</td>
    <td class='hasFixVersion'>2.8.0</td>
  </tr>
  <tr>
    <td class='key'>
      <a href='https://jira.mongodb.org/browse/SWIFT-1279'>SWIFT-1279</a>
    </td>
    <td>Won't Do</td>
    <td class=''></td>
  </tr>
</table>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_18362" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Engineering Lead</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>jeff.yemin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10858" key="com.pyxis.greenhopper.jira:gh-epic-label">
                        <customfieldname>Epic Name</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Direct read/write retries to another mongos if possible</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10859" key="com.pyxis.greenhopper.jira:gh-epic-status">
                        <customfieldname>Epic Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10640"><![CDATA[To Do]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_20964" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Final Cost Estimate</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_18358" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Product Manager</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alex.bevilacqua@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18359" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Program Manager</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>tom.selander@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY24Q1</label>
            <label>FY24Q2</label>
            <label>FY24Q3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr1k1p:k</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_10856" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Scope Cost Estimate</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_22279" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Server Compat</customfieldname>
                        <customfieldvalues>
                                        <label>4.4</label>
            <label>5.0</label>
            <label>5.3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_14261" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 8 May 2023 00:00:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_21457" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Upstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Details TBD&lt;/p&gt;</customfieldvalue>

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