<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:22:41 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-961] Support serverSelectionTryOnce in multi-threaded drivers</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-961</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;p&gt;The &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#serverselectiontryonce&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;current spec&lt;/a&gt; indicates that single-threaded drivers must implement &lt;tt&gt;serverselectiontryonce&lt;/tt&gt; but multi-threaded drivers must not.&lt;/p&gt;

&lt;p&gt;There&apos;s benefit in implementing &lt;tt&gt;serverselectiontryonce&lt;/tt&gt; in multi-threaded drivers as well so they can fail fast in case the server isn&apos;t running.&lt;br/&gt;
Using a low &lt;tt&gt;serverSelectionTimeout&lt;/tt&gt; isn&apos;t sufficient as we need to distinguish between a case in which the server is actually down (where the dialer returns &lt;tt&gt;connection refused&lt;/tt&gt;) or the connection is closed and other cases in which the server is simply slow to respond.&lt;/p&gt;

&lt;p&gt;Current workarounds are a bit cumbersome - for example when working with the Go Driver we were able to workaround this using the following approaches:&lt;br/&gt;
1. Connect to the host:port with a simple TCP dialer before we attempt to Connect/Ping using the driver &lt;br/&gt;
2. Pass on a custom dialer with a cancel function and invoke the cancel function if we hit &quot;connection refused&quot;&lt;/p&gt;

&lt;p&gt;To highlight the benefit of this (on top of cleaner code) - this is expected to introduce a significant performance boost to the MongoDB agent, especially in large clusters deployments&lt;/p&gt;</description>
                <environment></environment>
        <key id="979014">DRIVERS-961</key>
            <summary>Support serverSelectionTryOnce in multi-threaded drivers</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10033" iconUrl="https://jira.mongodb.org/images/icons/statuses/information.png" description="Status for tickets that need to be escalated and unblocked on our team.">Blocked</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="rachelle.palmer@mongodb.com">Rachelle Palmer</assignee>
                                    <reporter username="tomer.yakir@mongodb.com">Tomer Yakir</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Oct 2019 06:25:14 +0000</created>
                <updated>Wed, 29 Jul 2020 15:05:55 +0000</updated>
                                                                <component>SDAM</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="2954717" author="esha.bhargava" created="Mon, 9 Mar 2020 16:59:39 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rachelle.palmer&quot; class=&quot;user-hover&quot; rel=&quot;rachelle.palmer&quot;&gt;rachelle.palmer&lt;/a&gt; can you have a look at this one?&lt;/p&gt;</comment>
                            <comment id="2753541" author="oleg.pudeyev" created="Wed, 22 Jan 2020 20:07:15 +0000"  >&lt;p&gt;This came up before: &lt;a href=&quot;https://jira.mongodb.org/browse/SPEC-1167&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SPEC-1167&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We currently recommend lowering server selection timeout from its default in both development and production environments (for different reasons): &lt;a href=&quot;https://docs.mongodb.com/ruby-driver/master/tutorials/ruby-driver-create-client/#development-configuration&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/ruby-driver/master/tutorials/ruby-driver-create-client/#development-configuration&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;FWIW, Ruby driver implements something similar to serverselectiontryonce for legacy compatibility, to provide the illusion of the driver synchronously scanning each server before returning from constructor (but the scanning time is bound by server selection timeout, and servers are scanned in parallel; the scan also doesn&apos;t stop on a primary or a particular server type but tries to contact each server in the seed list). This functionality can be turned off by applications if desired and we&apos;ll drop this feature in the next major version.&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">
                                                        </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hx9fsf:</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>