<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:00:06 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-2481] SlaveOK queries shouldn&apos;t go to slaves in RECOVERING state</title>
                <link>https://jira.mongodb.org/browse/SERVER-2481</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;mongo shell connected to mongos with single replica set shard&lt;/p&gt;

&lt;p&gt;&amp;gt; db.foo.find().itcount()&lt;br/&gt;
1000&lt;br/&gt;
&amp;gt; db.getMongo().setSlaveOk()&lt;br/&gt;
&amp;gt; db.foo.find().itcount()&lt;br/&gt;
Fri Feb  4 16:21:22 uncaught exception: error: &lt;/p&gt;
{ &quot;$err&quot; : &quot;not master or secondary, can&apos;t read&quot;, &quot;code&quot; : 13436 }
&lt;p&gt;&amp;gt; db.getMongo().slaveOk = false&lt;br/&gt;
false&lt;br/&gt;
&amp;gt; db.foo.find().itcount()&lt;br/&gt;
1000&lt;/p&gt;

&lt;p&gt;connecting directly to replSet:&lt;/p&gt;

&lt;p&gt;rs.status()&lt;br/&gt;
{&lt;br/&gt;
	&quot;set&quot; : &quot;slave_ok_no_master&quot;,&lt;br/&gt;
	&quot;date&quot; : ISODate(&quot;2011-02-04T21:21:07Z&quot;),&lt;br/&gt;
	&quot;myState&quot; : 1,&lt;br/&gt;
	&quot;members&quot; : [&lt;br/&gt;
		{&lt;br/&gt;
			&quot;_id&quot; : 0,&lt;br/&gt;
			&quot;name&quot; : &quot;redbeard:31000&quot;,&lt;br/&gt;
			&quot;health&quot; : 1,&lt;br/&gt;
			&quot;state&quot; : 1,&lt;br/&gt;
			&quot;stateStr&quot; : &quot;PRIMARY&quot;,&lt;br/&gt;
			&quot;optime&quot; : &lt;/p&gt;
{
				&quot;t&quot; : 1296854198000,
				&quot;i&quot; : 302
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;optimeDate&quot; : ISODate(&quot;2011-02-04T21:16:38Z&quot;),&lt;br/&gt;
			&quot;self&quot; : true&lt;br/&gt;
		},&lt;br/&gt;
		{&lt;br/&gt;
			&quot;_id&quot; : 1,&lt;br/&gt;
			&quot;name&quot; : &quot;redbeard:31001&quot;,&lt;br/&gt;
			&quot;health&quot; : 1,&lt;br/&gt;
			&quot;state&quot; : 3,&lt;br/&gt;
			&quot;stateStr&quot; : &quot;RECOVERING&quot;,&lt;br/&gt;
			&quot;uptime&quot; : 372,&lt;br/&gt;
			&quot;optime&quot; : &lt;/p&gt;
{
				&quot;t&quot; : 1296854197000,
				&quot;i&quot; : 176
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;optimeDate&quot; : ISODate(&quot;2011-02-04T21:16:37Z&quot;),&lt;br/&gt;
			&quot;lastHeartbeat&quot; : ISODate(&quot;2011-02-04T21:21:05Z&quot;),&lt;br/&gt;
			&quot;errmsg&quot; : &quot;error RS102 too stale to catch up&quot;&lt;br/&gt;
		},&lt;br/&gt;
		{&lt;br/&gt;
			&quot;_id&quot; : 2,&lt;br/&gt;
			&quot;name&quot; : &quot;redbeard:31002&quot;,&lt;br/&gt;
			&quot;health&quot; : 1,&lt;br/&gt;
			&quot;state&quot; : 3,&lt;br/&gt;
			&quot;stateStr&quot; : &quot;RECOVERING&quot;,&lt;br/&gt;
			&quot;uptime&quot; : 372,&lt;br/&gt;
			&quot;optime&quot; : &lt;/p&gt;
{
				&quot;t&quot; : 1296854197000,
				&quot;i&quot; : 2
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;optimeDate&quot; : ISODate(&quot;2011-02-04T21:16:37Z&quot;),&lt;br/&gt;
			&quot;lastHeartbeat&quot; : ISODate(&quot;2011-02-04T21:21:05Z&quot;),&lt;br/&gt;
			&quot;errmsg&quot; : &quot;error RS102 too stale to catch up&quot;&lt;br/&gt;
		},&lt;br/&gt;
		{&lt;br/&gt;
			&quot;_id&quot; : 3,&lt;br/&gt;
			&quot;name&quot; : &quot;redbeard:31003&quot;,&lt;br/&gt;
			&quot;health&quot; : 1,&lt;br/&gt;
			&quot;state&quot; : 3,&lt;br/&gt;
			&quot;stateStr&quot; : &quot;RECOVERING&quot;,&lt;br/&gt;
			&quot;uptime&quot; : 382,&lt;br/&gt;
			&quot;optime&quot; : &lt;/p&gt;
{
				&quot;t&quot; : 1296854197000,
				&quot;i&quot; : 54
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;optimeDate&quot; : ISODate(&quot;2011-02-04T21:16:37Z&quot;),&lt;br/&gt;
			&quot;lastHeartbeat&quot; : ISODate(&quot;2011-02-04T21:21:05Z&quot;),&lt;br/&gt;
			&quot;errmsg&quot; : &quot;error RS102 too stale to catch up&quot;&lt;br/&gt;
		},&lt;br/&gt;
		{&lt;br/&gt;
			&quot;_id&quot; : 4,&lt;br/&gt;
			&quot;name&quot; : &quot;redbeard:31004&quot;,&lt;br/&gt;
			&quot;health&quot; : 1,&lt;br/&gt;
			&quot;state&quot; : 3,&lt;br/&gt;
			&quot;stateStr&quot; : &quot;RECOVERING&quot;,&lt;br/&gt;
			&quot;uptime&quot; : 372,&lt;br/&gt;
			&quot;optime&quot; : &lt;/p&gt;
{
				&quot;t&quot; : 1296854197000,
				&quot;i&quot; : 202
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;optimeDate&quot; : ISODate(&quot;2011-02-04T21:16:37Z&quot;),&lt;br/&gt;
			&quot;lastHeartbeat&quot; : ISODate(&quot;2011-02-04T21:21:05Z&quot;),&lt;br/&gt;
			&quot;errmsg&quot; : &quot;error RS102 too stale to catch up&quot;&lt;br/&gt;
		},&lt;br/&gt;
		{&lt;br/&gt;
			&quot;_id&quot; : 5,&lt;br/&gt;
			&quot;name&quot; : &quot;redbeard:31005&quot;,&lt;br/&gt;
			&quot;health&quot; : 1,&lt;br/&gt;
			&quot;state&quot; : 3,&lt;br/&gt;
			&quot;stateStr&quot; : &quot;RECOVERING&quot;,&lt;br/&gt;
			&quot;uptime&quot; : 372,&lt;br/&gt;
			&quot;optime&quot; : &lt;/p&gt;
{
				&quot;t&quot; : 1296854197000,
				&quot;i&quot; : 51
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;optimeDate&quot; : ISODate(&quot;2011-02-04T21:16:37Z&quot;),&lt;br/&gt;
			&quot;lastHeartbeat&quot; : ISODate(&quot;2011-02-04T21:21:05Z&quot;),&lt;br/&gt;
			&quot;errmsg&quot; : &quot;error RS102 too stale to catch up&quot;&lt;br/&gt;
		},&lt;br/&gt;
		{&lt;br/&gt;
			&quot;_id&quot; : 6,&lt;br/&gt;
			&quot;name&quot; : &quot;redbeard:31006&quot;,&lt;br/&gt;
			&quot;health&quot; : 1,&lt;br/&gt;
			&quot;state&quot; : 3,&lt;br/&gt;
			&quot;stateStr&quot; : &quot;RECOVERING&quot;,&lt;br/&gt;
			&quot;uptime&quot; : 382,&lt;br/&gt;
			&quot;optime&quot; : &lt;/p&gt;
{
				&quot;t&quot; : 1296854197000,
				&quot;i&quot; : 10
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;optimeDate&quot; : ISODate(&quot;2011-02-04T21:16:37Z&quot;),&lt;br/&gt;
			&quot;lastHeartbeat&quot; : ISODate(&quot;2011-02-04T21:21:05Z&quot;),&lt;br/&gt;
			&quot;errmsg&quot; : &quot;error RS102 too stale to catch up&quot;&lt;br/&gt;
		}&lt;br/&gt;
	],&lt;br/&gt;
	&quot;ok&quot; : 1&lt;br/&gt;
}&lt;br/&gt;
&amp;gt; db.setSlaveOk()&lt;br/&gt;
&amp;gt; db.foo.find().itcount()&lt;br/&gt;
1000&lt;/p&gt;

</description>
                <environment></environment>
        <key id="14530">SERVER-2481</key>
            <summary>SlaveOK queries shouldn&apos;t go to slaves in RECOVERING state</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="greg_10gen">Greg Studer</assignee>
                                    <reporter username="mathias@mongodb.com">Mathias Stearn</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Feb 2011 21:26:47 +0000</created>
                <updated>Tue, 12 Jul 2016 00:19:24 +0000</updated>
                            <resolved>Thu, 16 Jun 2011 21:37:04 +0000</resolved>
                                                    <fixVersion>1.8.3</fixVersion>
                    <fixVersion>1.9.1</fixVersion>
                                    <component>Sharding</component>
                                        <votes>2</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="41694" author="auto" created="Mon, 11 Jul 2011 20:18:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;gregstuder&apos;, u&apos;name&apos;: u&apos;gregs&apos;, u&apos;email&apos;: u&apos;greg@10gen.com&apos;}
&lt;p&gt;Message: backport of fix for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2481&quot; title=&quot;SlaveOK queries shouldn&amp;#39;t go to slaves in RECOVERING state&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2481&quot;&gt;&lt;del&gt;SERVER-2481&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: v1.8&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3337ab497cd55e25fbdbe732e6c40c724add857d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3337ab497cd55e25fbdbe732e6c40c724add857d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="37936" author="auto" created="Thu, 16 Jun 2011 21:36:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;gregstuder&apos;, u&apos;name&apos;: u&apos;gregs&apos;, u&apos;email&apos;: u&apos;greg@10gen.com&apos;}
&lt;p&gt;Message: better logic for no-result in rs for parallel ops &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2481&quot; title=&quot;SlaveOK queries shouldn&amp;#39;t go to slaves in RECOVERING state&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2481&quot;&gt;&lt;del&gt;SERVER-2481&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/884e100ec01d21f493c327a72b92a5b1a5dfb440&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/884e100ec01d21f493c327a72b92a5b1a5dfb440&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="37935" author="auto" created="Thu, 16 Jun 2011 21:36:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;gregstuder&apos;, u&apos;name&apos;: u&apos;gregs&apos;, u&apos;email&apos;: u&apos;greg@10gen.com&apos;}
&lt;p&gt;Message: tests for parallel cursor and failover &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2481&quot; title=&quot;SlaveOK queries shouldn&amp;#39;t go to slaves in RECOVERING state&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2481&quot;&gt;&lt;del&gt;SERVER-2481&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3316127d58babf98830a8f59fbb16c222df88107&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3316127d58babf98830a8f59fbb16c222df88107&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="37934" author="auto" created="Thu, 16 Jun 2011 21:36:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;gregstuder&apos;, u&apos;name&apos;: u&apos;gregs&apos;, u&apos;email&apos;: u&apos;greg@10gen.com&apos;}
&lt;p&gt;Message: parallel cursor recover gracefully from replica set and other errors &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2481&quot; title=&quot;SlaveOK queries shouldn&amp;#39;t go to slaves in RECOVERING state&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2481&quot;&gt;&lt;del&gt;SERVER-2481&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4d8ee4cc7c4d32ace1b1cab403dd429d9467a677&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4d8ee4cc7c4d32ace1b1cab403dd429d9467a677&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="36337" author="greg_10gen" created="Mon, 6 Jun 2011 14:29:07 +0000"  >&lt;p&gt;New parallel cursor has this behavior as well.&lt;/p&gt;</comment>
                            <comment id="35623" author="greg_10gen" created="Wed, 1 Jun 2011 20:10:00 +0000"  >&lt;p&gt;Wrong ticket for commit, but this addresses the problem (had two jira cases open)&lt;/p&gt;

&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;gregstuder&apos;, u&apos;name&apos;: u&apos;gregs&apos;, u&apos;email&apos;: u&apos;greg@10gen.com&apos;}
&lt;p&gt;Message: check for not master or secondary error on slave queries, re-route &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2481&quot; title=&quot;SlaveOK queries shouldn&amp;#39;t go to slaves in RECOVERING state&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2481&quot;&gt;&lt;del&gt;SERVER-2481&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b2236461fa760ee455108fbf14ccf3099ff75187&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b2236461fa760ee455108fbf14ccf3099ff75187&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="34024" author="wayne530" created="Mon, 23 May 2011 22:02:10 +0000"  >&lt;p&gt;any updates on this? it makes slaveOk unusable.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </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>Mon, 23 May 2011 22:02:10 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 32 weeks, 2 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, 32 weeks, 2 days 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>auto</customfieldvalue>
            <customfieldvalue>greg_10gen</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>wayne530</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrp713:</customfieldvalue>

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

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

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