<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:10:40 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>[CDRIVER-799] Scanner must obey connectTimeoutMS</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-799</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;Currently the scanner waits serverSelectionTimeoutMS to connect to all servers and receive ismaster responses. This doesn&apos;t match &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#socket-timeout-for-monitoring-is-connecttimeoutms&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the spec&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The socket used to check a server MUST use the same connectTimeoutMS as regular sockets. Multi-threaded clients SHOULD set monitoring sockets&apos; socketTimeoutMS to the connectTimeoutMS.&lt;/p&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;When a client waits for a server to respond to a connection, the client does not know if the server will respond eventually or if it is down. Users can help the client guess correctly by supplying a reasonable connectTimeoutMS for their network: on some networks a server is probably down if it hasn&apos;t responded in 10 ms, on others a server might still be up even if it hasn&apos;t responded in 10 seconds.&lt;/p&gt;

&lt;p&gt;The socketTimeoutMS, on the other hand, must account for both network latency and the operation&apos;s duration on the server. Applications should typically set a very long or infinite socketTimeoutMS so they can wait for long-running MongoDB operations.&lt;/p&gt;

&lt;p&gt;Multi-threaded clients use distinct sockets for monitoring and for application operations. A socket used for monitoring does two things: it connects and calls ismaster. Both operations are fast on the server, so only network latency matters. Thus both operations SHOULD use connectTimeoutMS, since that is the value users supply to help the client guess if a server is down, based on users&apos; knowledge of expected latencies on their networks.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;serverSelectionTimeoutMS on the other hand expresses the user&apos;s expectation of how long an election or other topology change might take. The two knobs should be kept distinct.&lt;/p&gt;

&lt;p&gt;The selection time for a single-threaded client with serverSelectionTryOnce &quot;on&quot; (the default) should be affected by connectTimeoutMS, not serverSelectionTimeoutMS, but currently it&apos;s the opposite.&lt;/p&gt;</description>
                <environment></environment>
        <key id="225243">CDRIVER-799</key>
            <summary>Scanner must obey connectTimeoutMS</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="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="9">Done</resolution>
                                        <assignee username="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Aug 2015 12:46:21 +0000</created>
                <updated>Wed, 19 Oct 2016 14:15:12 +0000</updated>
                            <resolved>Mon, 17 Aug 2015 21:54:46 +0000</resolved>
                                    <version>1.2-beta0</version>
                                    <fixVersion>1.2-beta1</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1365255" author="xgen-internal-githook" created="Tue, 23 Aug 2016 17:37:41 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1473&quot; title=&quot;Unreliable &amp;quot;/Topology/connect_timeout/single/try_once_false&amp;quot; test on 32-bit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1473&quot;&gt;&lt;del&gt;CDRIVER-1473&lt;/del&gt;&lt;/a&gt; delete flakey timeout test&lt;/p&gt;

&lt;p&gt;This test was to prove the scanner obeys connectTimeoutMS (&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-799&quot; title=&quot;Scanner must obey connectTimeoutMS&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-799&quot;&gt;&lt;del&gt;CDRIVER-799&lt;/del&gt;&lt;/a&gt;),&lt;br/&gt;
but test_select_after_try_once does that more simply and reliably.&lt;/p&gt;

&lt;p&gt;Also deals with &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1305&quot; title=&quot;Some tests hang on 32-bit Unix&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1305&quot;&gt;&lt;del&gt;CDRIVER-1305&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/0402b055070d76b6ffe830dd26a1c4b4299085e4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/0402b055070d76b6ffe830dd26a1c4b4299085e4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1007577" author="xgen-internal-githook" created="Mon, 17 Aug 2015 21:54:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-799&quot; title=&quot;Scanner must obey connectTimeoutMS&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-799&quot;&gt;&lt;del&gt;CDRIVER-799&lt;/del&gt;&lt;/a&gt; use connecttimeoutms for ismaster checks&lt;/p&gt;

&lt;p&gt;Currently the scanner waits serverSelectionTimeoutMS to connect to all servers&lt;br/&gt;
and receive ismaster responses. This doesn&apos;t match the spec:&lt;/p&gt;

&lt;p&gt;&quot;The socket used to check a server MUST use the same connectTimeoutMS as&lt;br/&gt;
regular sockets. Multi-threaded clients SHOULD set monitoring sockets&apos;&lt;br/&gt;
socketTimeoutMS to the connectTimeoutMS.&quot;&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/98f5fdaac04fa562791a6284a93ec943014d59c3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/98f5fdaac04fa562791a6284a93ec943014d59c3&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <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|hschef:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="676">C Driver 2015Q2 sprint 6</customfieldvalue>

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