<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:59:53 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-2411] Mongo shell doesn&apos;t allow to set slaveOk when connecting to mongos</title>
                <link>https://jira.mongodb.org/browse/SERVER-2411</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;celestine-3:27017 is a working mongos instance&lt;/p&gt;

&lt;p&gt;1.6.5 mongo works fine:&lt;br/&gt;
xm@celestine-3:~$ /opt/mongodb/bin/mongo celestine-3&lt;br/&gt;
MongoDB shell version: 1.6.5&lt;br/&gt;
connecting to: celestine-3&lt;br/&gt;
&amp;gt; rs.slaveOk()&lt;br/&gt;
&amp;gt; &lt;/p&gt;

&lt;p&gt;Current (yesterday &apos;nightly&apos;) behaves strangely&lt;br/&gt;
xm@celestine-3:~$ ./db/bin/mongo celestine-3&lt;br/&gt;
MongoDB shell version: 1.7.5-pre-&lt;br/&gt;
connecting to: celestine-3&lt;br/&gt;
&amp;gt; rs.slaveOk()&lt;br/&gt;
unrecognized command: replSetGetStatus&lt;br/&gt;
&amp;gt; &lt;/p&gt;

&lt;p&gt;Connecting to mongod works fine.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14312">SERVER-2411</key>
            <summary>Mongo shell doesn&apos;t allow to set slaveOk when connecting to mongos</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="onyxmaster">Aristarkh Zagorodnikov</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Jan 2011 15:37:32 +0000</created>
                <updated>Tue, 12 Jul 2016 00:18:09 +0000</updated>
                            <resolved>Tue, 1 Feb 2011 16:38:42 +0000</resolved>
                                    <version>1.7.5</version>
                                    <fixVersion>1.7.6</fixVersion>
                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="22997" author="eliot" created="Wed, 2 Feb 2011 15:49:41 +0000"  >&lt;p&gt;Ok, fixed for real&lt;/p&gt;</comment>
                            <comment id="22992" author="auto" created="Wed, 2 Feb 2011 15:47:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;erh&apos;, u&apos;name&apos;: u&apos;Eliot Horowitz&apos;, u&apos;email&apos;: u&apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: fix replSetGetStatus for shell &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2411&quot; title=&quot;Mongo shell doesn&amp;#39;t allow to set slaveOk when connecting to mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2411&quot;&gt;&lt;del&gt;SERVER-2411&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9297201b7f10690812917a60bc6f283e67972625&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9297201b7f10690812917a60bc6f283e67972625&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="22980" author="onyxmaster" created="Wed, 2 Feb 2011 09:39:05 +0000"  >&lt;p&gt;The error changed, but shell still behaves strangely when connected to mongos:&lt;/p&gt;

&lt;p&gt;&amp;gt; var f = 0;&lt;br/&gt;
replSetGetStatus is not supported through mongos&lt;/p&gt;

&lt;p&gt;I suppose the problem lies in shell/dbshell.cpp, sayReplSetMemberState(). It is used as a part of a shell prompt generation and calls replSetGetStatus to find out the replica set name and primary/secondary status. I don&apos;t think that shell should call replSetGetStatus on any server at all, unless it&apos;s sure that it&apos;s connected to a replica set.&lt;/p&gt;</comment>
                            <comment id="22950" author="auto" created="Tue, 1 Feb 2011 16:38:50 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;erh&apos;, u&apos;name&apos;: u&apos;Eliot Horowitz&apos;, u&apos;email&apos;: u&apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: implement replSetGetStatus so we don&apos;t get ugly errors &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2411&quot; title=&quot;Mongo shell doesn&amp;#39;t allow to set slaveOk when connecting to mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2411&quot;&gt;&lt;del&gt;SERVER-2411&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4e678efc48b86b9de737a20238d50259b21ab476&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4e678efc48b86b9de737a20238d50259b21ab476&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="22937" author="onyxmaster" created="Tue, 1 Feb 2011 10:56:36 +0000"  >&lt;p&gt;xm@celestine-3:~$ /opt/mongodb/bin/mongo celestine-3:27017/test1&lt;br/&gt;
MongoDB shell version: 1.8.0-rc0-pre-&lt;br/&gt;
connecting to: celestine-3:27017/test1&lt;br/&gt;
&amp;gt; var f = 0;&lt;br/&gt;
unrecognized command: replSetGetStatus&lt;/p&gt;</comment>
                            <comment id="22936" author="onyxmaster" created="Tue, 1 Feb 2011 09:55:12 +0000"  >&lt;p&gt;Also, consider the following (Git version 9a6f2dcf91c2025f7549c875e78e4a203b26adcf):&lt;/p&gt;

&lt;p&gt;xm@celestine-3/opt/mongodb/bin/mongo celestine-3:27017/test1&lt;br/&gt;
MongoDB shell version: 1.8.0-rc0-pre-&lt;br/&gt;
connecting to: celestine-3:27017/test1&lt;br/&gt;
&amp;gt; db.getMongo().slaveOk&lt;br/&gt;
unrecognized command: replSetGetStatus&lt;br/&gt;
&amp;gt; db.getMongo().slaveOk = true&lt;br/&gt;
true&lt;br/&gt;
&amp;gt; db.getMongo().slaveOk&lt;br/&gt;
true&lt;/p&gt;</comment>
                            <comment id="22733" author="onyxmaster" created="Thu, 27 Jan 2011 08:48:25 +0000"  >&lt;p&gt;Doesn&apos;t appear to be fixed in today&apos;s tarball (4eb5359825ca6d7133d0).&lt;br/&gt;
xm@celestine-3:~$ ./db/bin/mongo celestine-3&lt;br/&gt;
MongoDB shell version: 1.8.0-rc0-pre-&lt;br/&gt;
connecting to: celestine-3&lt;br/&gt;
&amp;gt; rs.slaveOk()&lt;br/&gt;
unrecognized command: replSetGetStatus&lt;/p&gt;</comment>
                    </comments>
                    <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>Tue, 1 Feb 2011 16:38:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 3 weeks 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>
                            13 years, 3 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </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>onyxmaster</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrp7xb:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>20720</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|hri2cf:</customfieldvalue>

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