<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:36:56 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>[GODRIVER-1695] heartbeats should always use connectTimeout as socket timeout</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1695</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;When the socket timeout is set, the heartbeat loop uses that instead of using connect timeout as the timeout.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1412952">GODRIVER-1695</key>
            <summary>heartbeats should always use connectTimeout as socket timeout</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="13201">Fixed</resolution>
                                        <assignee username="isabella.siu@mongodb.com">Isabella Siu</assignee>
                                    <reporter username="surajn.vnit@gmail.com">Suraj Narkhede</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 Jul 2020 23:52:43 +0000</created>
                <updated>Sat, 28 Oct 2023 11:38:05 +0000</updated>
                            <resolved>Thu, 30 Jul 2020 16:01:58 +0000</resolved>
                                                    <fixVersion>1.4.0</fixVersion>
                    <fixVersion>1.3.6</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="3330853" author="divjot.arora" created="Mon, 10 Aug 2020 15:39:25 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bartle&quot; class=&quot;user-hover&quot; rel=&quot;bartle&quot;&gt;bartle&lt;/a&gt;&#160;Just wanted to let you know that we&apos;ve released 1.3.7 with the fix for &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1708&quot; title=&quot;Monitoring routine does not correctly set starting time in 1.3.6&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1708&quot;&gt;&lt;del&gt;GODRIVER-1708&lt;/del&gt;&lt;/a&gt;. Once again, thanks for reporting and debugging this!&lt;/p&gt;</comment>
                            <comment id="3328792" author="bartle" created="Fri, 7 Aug 2020 22:06:21 +0000"  >&lt;p&gt;+1, looks good to me.&lt;/p&gt;</comment>
                            <comment id="3328782" author="divjot.arora" created="Fri, 7 Aug 2020 21:58:23 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bartle&quot; class=&quot;user-hover&quot; rel=&quot;bartle&quot;&gt;bartle&lt;/a&gt;&#160;I&apos;ve got a PR up for &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1708&quot; title=&quot;Monitoring routine does not correctly set starting time in 1.3.6&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1708&quot;&gt;&lt;del&gt;GODRIVER-1708&lt;/del&gt;&lt;/a&gt; at&#160;&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/pull/475/files&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/pull/475/files&lt;/a&gt;. Feel free to take a look and comment. If all is fine in CI, we&apos;ll likely merge early next week.&lt;/p&gt;</comment>
                            <comment id="3328738" author="bartle" created="Fri, 7 Aug 2020 21:39:58 +0000"  >&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                            <comment id="3328728" author="divjot.arora" created="Fri, 7 Aug 2020 21:32:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bartle&quot; class=&quot;user-hover&quot; rel=&quot;bartle&quot;&gt;bartle&lt;/a&gt;&#160;I filed &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1708&quot; title=&quot;Monitoring routine does not correctly set starting time in 1.3.6&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1708&quot;&gt;&lt;del&gt;GODRIVER-1708&lt;/del&gt;&lt;/a&gt; for this. We&apos;re planning on expediting out a 1.3.7 release next week with the bugfix. Thanks for reporting!&lt;/p&gt;</comment>
                            <comment id="3328526" author="divjot.arora" created="Fri, 7 Aug 2020 20:05:32 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bartle&quot; class=&quot;user-hover&quot; rel=&quot;bartle&quot;&gt;bartle&lt;/a&gt;&#160;Yeah, I think that&apos;s right. This is due to a difference in the 1.4.0 and 1.3.x branches because we made significant changes to the heartbeating code in 1.4.0.&lt;/p&gt;</comment>
                            <comment id="3328515" author="bartle" created="Fri, 7 Aug 2020 20:00:55 +0000"  >&lt;p&gt;I think this broke averageRTT updating, at least on the 1.3 branch.&#160; We used to set &quot;now = time.Now()&quot; on&#160;&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/61c371255d98bb1a9556ad0f5b38d48635a24bbf#diff-cc0b094d8ce69672d7e2ff6da8ff60f5L479&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/61c371255d98bb1a9556ad0f5b38d48635a24bbf#diff-cc0b094d8ce69672d7e2ff6da8ff60f5L479&lt;/a&gt;, but when that block was moved into &quot;createConnection&quot; we lost that.&#160; That means that when later call &lt;tt&gt;desc = desc.SetAverageRTT(s.updateAverageRTT(delay))&lt;/tt&gt;, we&apos;ll compute &lt;tt&gt;delay&lt;/tt&gt; as &lt;tt&gt;time.Since(time.Time{})&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="3314032" author="xgen-internal-githook" created="Thu, 30 Jul 2020 15:52:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Isabella Siu&apos;, &apos;email&apos;: &apos;isabella.siu@10gen.com&apos;, &apos;username&apos;: &apos;iwysiu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1695&quot; title=&quot;heartbeats should always use connectTimeout as socket timeout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1695&quot;&gt;&lt;del&gt;GODRIVER-1695&lt;/del&gt;&lt;/a&gt; always use heartbeatTimeout for heartbeat connection (#470)&lt;br/&gt;
Branch: release/1.3&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/61c371255d98bb1a9556ad0f5b38d48635a24bbf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/61c371255d98bb1a9556ad0f5b38d48635a24bbf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3313996" author="xgen-internal-githook" created="Thu, 30 Jul 2020 15:39:02 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Isabella Siu&apos;, &apos;email&apos;: &apos;isabella.siu@10gen.com&apos;, &apos;username&apos;: &apos;iwysiu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1695&quot; title=&quot;heartbeats should always use connectTimeout as socket timeout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1695&quot;&gt;&lt;del&gt;GODRIVER-1695&lt;/del&gt;&lt;/a&gt; always use heartbeatTimeout for heartbeat connection (#470)&lt;br/&gt;
Branch: release/1.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/d3ceaf30fad597f8bb0a08a3eb7a7310f159169f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/d3ceaf30fad597f8bb0a08a3eb7a7310f159169f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3313835" author="xgen-internal-githook" created="Thu, 30 Jul 2020 14:33:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Isabella Siu&apos;, &apos;email&apos;: &apos;isabella.siu@10gen.com&apos;, &apos;username&apos;: &apos;iwysiu&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1695&quot; title=&quot;heartbeats should always use connectTimeout as socket timeout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1695&quot;&gt;&lt;del&gt;GODRIVER-1695&lt;/del&gt;&lt;/a&gt; always use heartbeatTimeout for heartbeat connection (#470)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/a8b8f62c130771f1d0edf3e5bbe73df71a3f4c56&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/a8b8f62c130771f1d0edf3e5bbe73df71a3f4c56&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3310828" author="isabella.siu" created="Tue, 28 Jul 2020 20:57:54 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=surajn.vnit%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;surajn.vnit@gmail.com&quot;&gt;surajn.vnit@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thanks for the repro! The fix for this should be in the next release&lt;/p&gt;</comment>
                            <comment id="3307696" author="surajn.vnit@gmail.com" created="Mon, 27 Jul 2020 16:34:43 +0000"  >&lt;p&gt;Hi Isabella Siu, Thank you for looking into this.&lt;/p&gt;

&lt;p&gt;I think that timeout is not honored if SocketTimeout is set on client. Is that the expected behavior?&lt;/p&gt;

&lt;p&gt;I can reproduce the issue with -&#160;&lt;a href=&quot;https://play.golang.org/p/oAsNvIYASo2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://play.golang.org/p/oAsNvIYASo2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;1) Start a replset with 3 nodes.&lt;/p&gt;

&lt;p&gt;2) Start the script.&lt;/p&gt;

&lt;p&gt;3) Add iptable rule to drop traffic to one of secondary port.&lt;/p&gt;

&lt;p&gt;I added a log line in driver to determine the time it takes to execute IsMaster, and I see&#160;&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;time &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; isMaster: addr=&lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;127.0&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;0.1&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;27017&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; time=1m0.000088482s&#160;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="3299642" author="isabella.siu" created="Thu, 23 Jul 2020 20:40:54 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=surajn.vnit%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;surajn.vnit@gmail.com&quot;&gt;surajn.vnit@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;The heartbeatTimeout actually gets passed into the operation&apos;s connection directly, and thus doesn&apos;t need to be passed into the operation:&#160;&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/v1.3.5/x/mongo/driver/topology/server.go#L470-L474&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/blob/v1.3.5/x/mongo/driver/topology/server.go#L470-L474&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I tested this earlier to double check, and confirmed that even if the server hangs for 20 seconds, op.Execute will return after 10 seconds.&lt;/p&gt;

&lt;p&gt;Does this clarify the driver&apos;s behavior? If so, we can go ahead and close out this ticket.&lt;/p&gt;</comment>
                            <comment id="3297732" author="surajn.vnit@gmail.com" created="Wed, 22 Jul 2020 21:55:56 +0000"  >&lt;p&gt;Hi &#8211; did you get a chance to look into this?&lt;/p&gt;</comment>
                            <comment id="3290969" author="surajn.vnit@gmail.com" created="Fri, 17 Jul 2020 23:07:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/pull/460&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/pull/460&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3290692" author="surajn.vnit@gmail.com" created="Fri, 17 Jul 2020 19:59:21 +0000"  >&lt;p&gt;I am referring to&#160;&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/v1.3.5/x/mongo/driver/topology/server.go#L500-L505&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/blob/v1.3.5/x/mongo/driver/topology/server.go#L500-L505&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1435608">GODRIVER-1708</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxic67:</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>