<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:04:33 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>[SERVER-3962] Trying to do slaveOk queries through mongos on a one-node replica set causes excessive calls to isMaster and replSetGetStatus</title>
                <link>https://jira.mongodb.org/browse/SERVER-3962</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If you only have one member in the replica set and try to do a slaveOk query, the mongos will look for a slave to send the query to, and when it cant find one it will call isMaster and replSetGetStatus to try and update its view of the state of the replSet to see if a secondary came online.  However as long as there is only one node in the set, there is no chance of that happening.  It should probably either just return the connection to the primary and log a warning, or it should throw an error and not process the query.&lt;/p&gt;</description>
                <environment></environment>
        <key id="22876">SERVER-3962</key>
            <summary>Trying to do slaveOk queries through mongos on a one-node replica set causes excessive calls to isMaster and replSetGetStatus</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="spencer@mongodb.com">Spencer Brody</assignee>
                                    <reporter username="spencer@mongodb.com">Spencer Brody</reporter>
                        <labels>
                    </labels>
                <created>Tue, 27 Sep 2011 15:23:06 +0000</created>
                <updated>Mon, 11 Jul 2016 18:35:14 +0000</updated>
                            <resolved>Thu, 6 Oct 2011 15:55:04 +0000</resolved>
                                    <version>2.0.0</version>
                                    <fixVersion>2.0.1</fixVersion>
                    <fixVersion>2.1.0</fixVersion>
                                    <component>Performance</component>
                    <component>Replication</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="59322" author="auto" created="Sun, 9 Oct 2011 03:37:00 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;dwight&apos;, u&apos;name&apos;: u&apos;dwight&apos;, u&apos;email&apos;: u&apos;dwight@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3962&quot; title=&quot;Trying to do slaveOk queries through mongos on a one-node replica set causes excessive calls to isMaster and replSetGetStatus&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3962&quot;&gt;&lt;del&gt;SERVER-3962&lt;/del&gt;&lt;/a&gt; previous commit wasnt right. backport.&lt;br/&gt;
Branch: v2.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/41ff2157a3fa5b0d722043f4db2ec947481897fe&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/41ff2157a3fa5b0d722043f4db2ec947481897fe&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="59321" author="auto" created="Sun, 9 Oct 2011 03:36:58 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;dwight&apos;, u&apos;name&apos;: u&apos;dwight&apos;, u&apos;email&apos;: u&apos;dwight@10gen.com&apos;}
&lt;p&gt;Message: finish &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3962&quot; title=&quot;Trying to do slaveOk queries through mongos on a one-node replica set causes excessive calls to isMaster and replSetGetStatus&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3962&quot;&gt;&lt;del&gt;SERVER-3962&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: v2.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a7796c9c09b1868bf72a28811059d448995e501c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a7796c9c09b1868bf72a28811059d448995e501c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="59320" author="auto" created="Sun, 9 Oct 2011 03:36:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;dwight&apos;, u&apos;name&apos;: u&apos;dwight&apos;, u&apos;email&apos;: u&apos;dwight@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3962&quot; title=&quot;Trying to do slaveOk queries through mongos on a one-node replica set causes excessive calls to isMaster and replSetGetStatus&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3962&quot;&gt;&lt;del&gt;SERVER-3962&lt;/del&gt;&lt;/a&gt; very high extraneous ismaster type commands from mongos to repl set if slaveok and no pure secondary is up&lt;br/&gt;
Branch: v2.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/8814b71b260805dd6afc0cea13acce37cf328e15&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/8814b71b260805dd6afc0cea13acce37cf328e15&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="57596" author="auto" created="Thu, 29 Sep 2011 15:54:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;dwight&apos;, u&apos;name&apos;: u&apos;dwight&apos;, u&apos;email&apos;: u&apos;dwight@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3962&quot; title=&quot;Trying to do slaveOk queries through mongos on a one-node replica set causes excessive calls to isMaster and replSetGetStatus&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3962&quot;&gt;&lt;del&gt;SERVER-3962&lt;/del&gt;&lt;/a&gt; previous commit wasnt right. backport.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a18dcc76ff649274799f5cbdb008fa023f49bcb3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a18dcc76ff649274799f5cbdb008fa023f49bcb3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="57181" author="auto" created="Wed, 28 Sep 2011 02:47:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;dwight&apos;, u&apos;name&apos;: u&apos;dwight&apos;, u&apos;email&apos;: u&apos;dwight@10gen.com&apos;}
&lt;p&gt;Message: finish &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3962&quot; title=&quot;Trying to do slaveOk queries through mongos on a one-node replica set causes excessive calls to isMaster and replSetGetStatus&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3962&quot;&gt;&lt;del&gt;SERVER-3962&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/77a43260c11679209f677efe30828aafc50b3e30&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/77a43260c11679209f677efe30828aafc50b3e30&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="57170" author="auto" created="Wed, 28 Sep 2011 01:08:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;dwight&apos;, u&apos;name&apos;: u&apos;dwight&apos;, u&apos;email&apos;: u&apos;dwight@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3962&quot; title=&quot;Trying to do slaveOk queries through mongos on a one-node replica set causes excessive calls to isMaster and replSetGetStatus&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3962&quot;&gt;&lt;del&gt;SERVER-3962&lt;/del&gt;&lt;/a&gt; very high extraneous ismaster type commands from mongos to repl set if slaveok and no pure secondary is up&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/19058fad75e1136e32b86936e496fb000bec1089&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/19058fad75e1136e32b86936e496fb000bec1089&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="56951" author="spencer" created="Tue, 27 Sep 2011 15:25:23 +0000"  >&lt;p&gt;The relevant code is in the getSlave() method in dbclient_rs.cpp.  If it can&apos;t find a secondary connection to return, it calls check(false), which calls _checkConnection which ultimately leads to the calls to isMaster and replSetGetStatus.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 28 Sep 2011 01:08:32 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 19 weeks, 3 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 19 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hropgf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrgctz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8988</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht0cxz:</customfieldvalue>

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