<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:34:37 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-633] commands meant for local node are directed to primary</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-633</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;We have our custom monitoring agent we run on each mongo instance, which call `serverStatus` like this:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#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;   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;connectStr := fmt.Sprintf(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;mongodb://%s:%s@%s:%d/%s&quot;&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;, h.Username, h.Password, &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;localhost&quot;&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;, h.Port, h.Database)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;client, e := mongo.NewClient(connectStr)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;ctx, _ := context.WithTimeout(context.Background(), &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;3&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.Second)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;client.Connect(ctx)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;db := client.Database(h.Database)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;rdr, e := db.RunCommand(ctx, bson.NewDocument(bson.EC.Int32(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;serverStatus&quot;&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;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;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;However, it seems the commands are always routed to the primary, since even when run on the secondaries, we get the exact same stats as the primary for metrics like connections, opcounters, opcountersRepl, etc.&lt;/p&gt;

&lt;p&gt;This seems to be a bug in the driver, where a query being run on &apos;localhost&apos; is being directed to the primary&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>Go 1.11&lt;br/&gt;
Linux 64 bit</environment>
        <key id="631858">GODRIVER-633</key>
            <summary>commands meant for local node are directed to primary</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="-1">Unassigned</assignee>
                                    <reporter username="pdeva">prashant deva</reporter>
                        <labels>
                    </labels>
                <created>Fri, 9 Nov 2018 20:17:12 +0000</created>
                <updated>Wed, 11 Sep 2019 18:36:06 +0000</updated>
                            <resolved>Thu, 29 Nov 2018 18:40:31 +0000</resolved>
                                    <version>0.0.17</version>
                                                    <component>Options &amp;amp; Configuration</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2075798" author="jeff.yemin" created="Thu, 29 Nov 2018 18:40:31 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=pdeva&quot; class=&quot;user-hover&quot; rel=&quot;pdeva&quot;&gt;pdeva&lt;/a&gt; Thanks for asking about this.&#160; We opened &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-665&quot; title=&quot;Support only &amp;quot;automatic&amp;quot; and &amp;quot;direct&amp;quot; as values for &amp;quot;connect&amp;quot; URI option&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-665&quot;&gt;&lt;del&gt;GODRIVER-665&lt;/del&gt;&lt;/a&gt; to address the issue.&lt;/p&gt;</comment>
                            <comment id="2075796" author="jeff.yemin" created="Thu, 29 Nov 2018 18:39:41 +0000"  >&lt;p&gt;Opened &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-665&quot; title=&quot;Support only &amp;quot;automatic&amp;quot; and &amp;quot;direct&amp;quot; as values for &amp;quot;connect&amp;quot; URI option&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-665&quot;&gt;&lt;del&gt;GODRIVER-665&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2072143" author="ian@10gen.com" created="Mon, 26 Nov 2018 21:52:34 +0000"  >&lt;p&gt;We will be removing one of the two prior to GA of 1.0.&lt;/p&gt;</comment>
                            <comment id="2059001" author="pdeva" created="Mon, 12 Nov 2018 17:37:42 +0000"  >&lt;p&gt;does that mean there are plans to replace them with something else in the future?&lt;/p&gt;

&lt;p&gt;any kind of documentation on this would be good to have&lt;/p&gt;</comment>
                            <comment id="2058905" author="kris.brandow" created="Mon, 12 Nov 2018 16:49:10 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=pdeva&quot; class=&quot;user-hover&quot; rel=&quot;pdeva&quot;&gt;pdeva&lt;/a&gt; There is no difference. You can use either, they both exist for historical purposes.&lt;/p&gt;</comment>
                            <comment id="2057883" author="pdeva" created="Sat, 10 Nov 2018 02:15:25 +0000"  >&lt;p&gt;Whats the difference between&#160;&lt;tt&gt;connect=direct&lt;/tt&gt;&#160;or&#160;&lt;tt&gt;connect=single?&#160;&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;This does not seem to be documented anywhere&lt;/p&gt;</comment>
                            <comment id="2057597" author="kris.brandow" created="Fri, 9 Nov 2018 20:26:43 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=pdeva&quot; class=&quot;user-hover&quot; rel=&quot;pdeva&quot;&gt;pdeva&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;The Go driver will do automatic cluster discovery unless you specify it shouldn&apos;t. If you want to connect directly to a secondary and run commands against that secondary you need to add either &lt;tt&gt;connect=direct&lt;/tt&gt; or &lt;tt&gt;connect=single&lt;/tt&gt; to the connection string.&lt;/p&gt;

&lt;p&gt;--Kris&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="640512">GODRIVER-665</issuekey>
        </issuelink>
                            </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|hr9mwf:</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>