<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:24: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>[SERVER-11117] Tagged Secondary Preffered not working as expected - Reads always happening at Primary </title>
                <link>https://jira.mongodb.org/browse/SERVER-11117</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;  During  testing we found that setting read Preference to  &quot;secondaryPreferred&quot; always  fetched records from primary even if the tag was invalid . But  the online documentation suggests an error should  be thrown  &quot;  &lt;a href=&quot;http://docs.mongodb.org/manual/reference/read-preference/#secondaryPreferred&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/reference/read-preference/#secondaryPreferred&lt;/a&gt; &quot; .   This leads me to believe Mongos/Java Driver  is not respecting tags or behaving otherwise and always reading  from primary .  Since our actual deployment is large  and geographically we need multiple secondaries &lt;/p&gt;

</description>
                <environment>Running on RHEL , Java driver 2.11.2 </environment>
        <key id="93595">SERVER-11117</key>
            <summary>Tagged Secondary Preffered not working as expected - Reads always happening at Primary </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="5">Cannot Reproduce</resolution>
                                        <assignee username="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="vinod.k">Vinod Kumar</reporter>
                        <labels>
                            <label>query_triage</label>
                    </labels>
                <created>Thu, 10 Oct 2013 06:29:29 +0000</created>
                <updated>Thu, 7 Nov 2013 22:34:11 +0000</updated>
                            <resolved>Fri, 1 Nov 2013 20:27:09 +0000</resolved>
                                    <version>2.4.5</version>
                                                    <component>Replication</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="450393" author="jesse" created="Fri, 1 Nov 2013 20:27:09 +0000"  >&lt;p&gt;Vinod, feel free to reopen this issue if you find a way to reproduce it.&lt;/p&gt;</comment>
                            <comment id="449028" author="jesse" created="Wed, 30 Oct 2013 20:02:12 +0000"  >&lt;p&gt;Vinod, are you currently able or unable to reproduce this problem? If you&apos;re unable, then &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9788&quot; title=&quot;mongos does not re-evaluate read preference once a valid replica set member is chosen&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9788&quot;&gt;&lt;del&gt;SERVER-9788&lt;/del&gt;&lt;/a&gt; might indeed be an explanation for a temporary routing of your queries to the primary with mode secondaryPreferred.&lt;/p&gt;

&lt;p&gt;If you &lt;b&gt;are&lt;/b&gt; able to reproduce this issue, could you please explain to me the steps you take to reproduce it, with code, and show me the log messages from mongos during your test?&lt;/p&gt;</comment>
                            <comment id="445905" author="vinod.k" created="Thu, 24 Oct 2013 08:47:54 +0000"  >&lt;p&gt;Just ran a query with both secondary &amp;amp; secondaryPreferred modes with both shard and non sharded keys .No such error was reported in the logs .&lt;/p&gt;

&lt;p&gt;If however there was null in the tag set  , I guess the  proper behavior should be it should not consider that as a tag and  work as usual  . &lt;/p&gt;

&lt;p&gt;Any idea on  &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9788&quot; title=&quot;mongos does not re-evaluate read preference once a valid replica set member is chosen&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9788&quot;&gt;&lt;del&gt;SERVER-9788&lt;/del&gt;&lt;/a&gt; .Seems quite similar  to what we might have really encountered as we were playing with  some of these scenarios .&lt;/p&gt;</comment>
                            <comment id="445165" author="jesse" created="Wed, 23 Oct 2013 12:12:19 +0000"  >&lt;p&gt;Vinod, read preferences like secondaryPreferred apply at the shard level. When you tell mongos that you prefer to read from secondaries, it applies that preference to each replica set. So, if one replica set has no secondaries, then mongos will read from the primary, whereas if another replica set has a secondary, mongos reads from the secondary.&lt;/p&gt;

&lt;p&gt;I&apos;m very curious about the &quot;User Assertion: 16357:Tags should be a BSON object&quot; message. If it&apos;s present in your log, then we&apos;ll know for certain the cause of the misbehavior you&apos;re seeing.&lt;/p&gt;</comment>
                            <comment id="445094" author="vinod.k" created="Wed, 23 Oct 2013 07:37:42 +0000"  >&lt;p&gt;OK will check and get back .. This query I got was from an older log file . hence need to ask the team to do a fresh run and get the output .&lt;/p&gt;

&lt;p&gt;A quick  confirmation question for you . Is the secondaryPreffered option at a shard level or at the mongos level  ? For e.g.  If I were to use secondaryPreffered  and one of  the secondaries in one of the shards  were to go down , would all the shard queries be  routed to their primary nodes  or only that shard&apos;s  query  would be routed to its primary .&lt;/p&gt;

&lt;p&gt;I just found a similar issue here &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9788&quot; title=&quot;mongos does not re-evaluate read preference once a valid replica set member is chosen&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9788&quot;&gt;&lt;del&gt;SERVER-9788&lt;/del&gt;&lt;/a&gt; . We might have noticed similar behaviour , when the secondary went down for some reason &lt;/p&gt;</comment>
                            <comment id="444521" author="jesse" created="Tue, 22 Oct 2013 13:14:37 +0000"  >&lt;p&gt;Can you confirm you&apos;re still seeing log messages like this one from mongos?:&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;shard query: u_db.enr { $query: { _id: { $in: [ &quot;someKey&quot; ] } }, $readPreference: { mode: &quot;secondaryPreferred&quot;, tags: [ { locations: &quot;validTag&quot; }, null ] }&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;In other words, the list of tags ends in &lt;tt&gt;null&lt;/tt&gt;? In that case mongos should also log:&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;User Assertion: 16357:Tags should be a BSON object&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;Is that message in your mongos log?&lt;/p&gt;</comment>
                            <comment id="444518" author="jesse" created="Tue, 22 Oct 2013 13:07:38 +0000"  >&lt;p&gt;Vinod, secondaryPreferred routes queries to secondaries, if any are available which match your tags. That&apos;s why I want to see some of your misbehaving code, to help you diagnose why your particular usage of secondaryPreferred is not giving you the results you want. Can I at least see your Java code where you configure the &lt;b&gt;tags&lt;/b&gt; to use? Or, can you reproduce the problem using the mongo shell, and show me the shell code you used to reproduce this issue?&lt;/p&gt;

&lt;p&gt;To verify for certain which member is used for a query, you can either watch the members&apos; logs, or turn on &lt;b&gt;profiling&lt;/b&gt; on each member, following the technique I outline here: &lt;a href=&quot;http://emptysqua.re/blog/real-time-profiling-a-mongodb-cluster/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://emptysqua.re/blog/real-time-profiling-a-mongodb-cluster/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="444455" author="vinod.k" created="Tue, 22 Oct 2013 10:29:03 +0000"  >&lt;p&gt;Hi,  Is there a sure shot way of verifying the behaviour of the query being routed to secondary  (while using secondary preferred)   ?  &lt;/p&gt;

&lt;p&gt;Coming to our code it has lot of frame work code  around it ,hence cant post the whole of it .&lt;br/&gt;
But we recently upgraded to the 2.11.3 from an older version of the driver , so Mongo became MongoClient  and so on  . &lt;/p&gt;

&lt;p&gt;Basically in Java  we set  all options  including secondary preferred  in MongoClientOptions  and use &lt;br/&gt;
MongoClient  mongo  = new MongoClient(address, mco) &lt;br/&gt;
and use the mongo instance .&lt;/p&gt;

&lt;p&gt;Parameters used &lt;/p&gt;

&lt;p&gt;readPreference - &amp;gt; secondary&lt;br/&gt;
writeConcern -&amp;gt; unacknowledged&lt;br/&gt;
connectionsPerHost -&amp;gt; 100&lt;br/&gt;
maxWaitTime -&amp;gt; 10000&lt;br/&gt;
socketTimeout -&amp;gt; 120000&lt;/p&gt;</comment>
                            <comment id="442895" author="jesse" created="Fri, 18 Oct 2013 13:30:29 +0000"  >&lt;p&gt;To avoid any further confusion, would it be possible for you to paste some actual unmodified code, which reproduces this problem, where I can see how you specify your read preference and tags? Either Java code or Mongo shell code is fine.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                            <comment id="442783" author="vinod.k" created="Fri, 18 Oct 2013 05:41:00 +0000"  >&lt;p&gt;Actually I had pruned some of the prod related terms with equiavalent terms , hence you see a slight mismatch in what I copy/pasted  . Sorry about that .. In our case  validTag = b  .Also we are passing only one tag ,Maybe thats the reason why you notice an empty {} &lt;/p&gt;</comment>
                            <comment id="442240" author="jesse" created="Thu, 17 Oct 2013 15:25:53 +0000"  >&lt;p&gt;The driver appears to be passing null at the end of the tag sets instead of {}, and mongos is misreporting the error.&lt;/p&gt;</comment>
                            <comment id="442227" author="jesse" created="Thu, 17 Oct 2013 15:05:14 +0000"  >&lt;p&gt;Thanks. I expect that if you replace &lt;/p&gt;
{&quot;locations&quot;: &quot;validTag&quot;}
&lt;p&gt; with a tag like &lt;/p&gt;
{&quot;locations&quot;: &quot;b&quot;}
&lt;p&gt; and use mode secondaryPreferred, you&apos;ll read from the secondary tagged with &quot;locations&quot;: &quot;b&quot;, that is, you&apos;ll read from &quot;psenv1.ugi:27010&quot;. Since &quot;validTag&quot; doesn&apos;t actually match any tags in your system, mongos falls back to reading from primary with mode secondaryPreferred.&lt;/p&gt;

&lt;p&gt;Alternatively, if you&apos;d like to fall back to reading from &lt;b&gt;any&lt;/b&gt; secondary in the case that no secondary matches your tag, include &quot;{}&quot; as the final tag set:&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;{ mode: &quot;secondaryPreferred&quot;, tags: [{ locations: &quot;validTag&quot; }, {} ] }&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;I notice in the mongos log you showed me that the final tag isn&apos;t &quot;{}&quot;, it&apos;s &quot;null&quot;. Can I see the Java code with which you specify your read preference and tags?&lt;/p&gt;</comment>
                            <comment id="442110" author="vinod.k" created="Thu, 17 Oct 2013 09:26:26 +0000"  >&lt;p&gt;Current output of rs.conf and rs.status &lt;br/&gt;
-----------------------------------------------------------------------------&lt;br/&gt;
 {&lt;br/&gt;
        &quot;_id&quot; : &quot;r1&quot;,&lt;br/&gt;
        &quot;version&quot; : 89492,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                {&lt;br/&gt;
                        &quot;_id&quot; : 0,&lt;br/&gt;
                        &quot;host&quot; : &quot;portals1.ugi:27010&quot;,&lt;br/&gt;
                        &quot;tags&quot; : &lt;/p&gt;
{
                                &quot;locations&quot; : &quot;b&quot;
                        }
&lt;p&gt;                },&lt;br/&gt;
                {&lt;br/&gt;
                        &quot;_id&quot; : 1,&lt;br/&gt;
                        &quot;host&quot; : &quot;psenv1.ugi:27010&quot;,&lt;br/&gt;
                        &quot;tags&quot; : &lt;/p&gt;
{
                                &quot;locations&quot; : &quot;b&quot;
                        }
&lt;p&gt;                },&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 2,
                        &quot;host&quot; : &quot;posenv1.ugi:27011&quot;,
                        &quot;arbiterOnly&quot; : true
                }
&lt;p&gt;,&lt;br/&gt;
                {&lt;br/&gt;
                        &quot;_id&quot; : 3,&lt;br/&gt;
                        &quot;host&quot; : &quot;psenv4.ugi:27010&quot;,&lt;br/&gt;
                        &quot;tags&quot; : &lt;/p&gt;
{
                                &quot;locations&quot; : &quot;g&quot;
                        }
&lt;p&gt;                }&lt;br/&gt;
        ]&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;-----------------------------------------------------------------------------&lt;br/&gt;
{&lt;br/&gt;
        &quot;set&quot; : &quot;r1&quot;,&lt;br/&gt;
        &quot;date&quot; : ISODate(&quot;2013-10-17T09:04:10Z&quot;),&lt;br/&gt;
        &quot;myState&quot; : 1,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 0,
                        &quot;name&quot; : &quot;portals1.ugi:27010&quot;,
                        &quot;health&quot; : 1,
                        &quot;state&quot; : 1,
                        &quot;stateStr&quot; : &quot;PRIMARY&quot;,
                        &quot;uptime&quot; : 786671,
                        &quot;optime&quot; : Timestamp(1382000647, 1),
                        &quot;optimeDate&quot; : ISODate(&quot;2013-10-17T09:04:07Z&quot;),
                        &quot;self&quot; : true
                }
&lt;p&gt;,&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 1,
                        &quot;name&quot; : &quot;psenv1.ugi:27010&quot;,
                        &quot;health&quot; : 1,
                        &quot;state&quot; : 2,
                        &quot;stateStr&quot; : &quot;SECONDARY&quot;,
                        &quot;uptime&quot; : 162259,
                        &quot;optime&quot; : Timestamp(1382000647, 1),
                        &quot;optimeDate&quot; : ISODate(&quot;2013-10-17T09:04:07Z&quot;),
                        &quot;lastHeartbeat&quot; : ISODate(&quot;2013-10-17T09:04:08Z&quot;),
                        &quot;lastHeartbeatRecv&quot; : ISODate(&quot;2013-10-17T09:04:08Z&quot;),
                        &quot;pingMs&quot; : 11,
                        &quot;syncingTo&quot; : &quot;portals1.ugi:27010&quot;
                }
&lt;p&gt;,&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 2,
                        &quot;name&quot; : &quot;posenv1.ugi:27011&quot;,
                        &quot;health&quot; : 1,
                        &quot;state&quot; : 7,
                        &quot;stateStr&quot; : &quot;ARBITER&quot;,
                        &quot;uptime&quot; : 162947,
                        &quot;lastHeartbeat&quot; : ISODate(&quot;2013-10-17T09:04:09Z&quot;),
                        &quot;lastHeartbeatRecv&quot; : ISODate(&quot;2013-10-17T09:04:09Z&quot;),
                        &quot;pingMs&quot; : 1
                }
&lt;p&gt;,&lt;/p&gt;
                {
                        &quot;_id&quot; : 3,
                        &quot;name&quot; : &quot;psenv4.ugi:27010&quot;,
                        &quot;health&quot; : 1,
                        &quot;state&quot; : 2,
                        &quot;stateStr&quot; : &quot;SECONDARY&quot;,
                        &quot;uptime&quot; : 162458,
                        &quot;optime&quot; : Timestamp(1382000647, 1),
                        &quot;optimeDate&quot; : ISODate(&quot;2013-10-17T09:04:07Z&quot;),
                        &quot;lastHeartbeat&quot; : ISODate(&quot;2013-10-17T09:04:09Z&quot;),
                        &quot;lastHeartbeatRecv&quot; : ISODate(&quot;2013-10-17T09:04:09Z&quot;),
                        &quot;pingMs&quot; : 5,
                        &quot;syncingTo&quot; : &quot;portals1.ugi:27010&quot;
                }
&lt;p&gt;        ],&lt;br/&gt;
        &quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="440766" author="jesse" created="Tue, 15 Oct 2013 12:26:51 +0000"  >&lt;p&gt;Could I see the output of rs.conf() and rs.status() when connected to the primary of the relevant replica set, please?&lt;/p&gt;</comment>
                            <comment id="440762" author="vinod.k" created="Tue, 15 Oct 2013 12:14:16 +0000"  >&lt;p&gt;Here is some logging  information we captured from Mongos ( connected to 2 shards with 3 RS members each)   a few weeks back  on our QA env . Basically our code generates query using secondaryPreffered with a tag as can be seen below . &lt;/p&gt;

&lt;p&gt;Wed Sep 11 10:36:47.369 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn648&amp;#93;&lt;/span&gt; shard query: u_db.enr  { $query: { _id: &lt;/p&gt;
{ $in: [ &quot;someKey&quot; ] }
&lt;p&gt; }, $readPreference: { mode: &quot;secondaryPreferred&quot;, tags: [ &lt;/p&gt;
{ locations: &quot;validTag&quot; }
&lt;p&gt;, null ] } &lt;/p&gt;

&lt;p&gt;We arrived at the conclusion that the bunch of queries  were not firing to primary and not  the secondary  by looking at the mongod  log on one of the replica set members which was &apos;primary &apos; at that point in time.&lt;/p&gt;

&lt;p&gt;Is there a sure shot way of verifying the behaviour or should  we stick to secondary instead of secondary preffered ?&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;</comment>
                            <comment id="439561" author="jesse" created="Fri, 11 Oct 2013 14:32:33 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vinod.k&quot; class=&quot;user-hover&quot; rel=&quot;vinod.k&quot;&gt;vinod.k&lt;/a&gt; secondaryPreferred reads should go to secondaries if any are available, and if at least one matches your &lt;b&gt;tags&lt;/b&gt;.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;How do you know the query is going to primary instead of secondaries?&lt;/li&gt;
	&lt;li&gt;Can you show us your code where you configure your read preference?&lt;/li&gt;
	&lt;li&gt;Do you observe this behavior when querying via mongos, or querying the replica set directly from the Java driver, or both?&lt;/li&gt;
	&lt;li&gt;Can we see the output of sh.status() run from a shell connected to mongos?&lt;/li&gt;
	&lt;li&gt;And the output of rs.conf() and rs.status() when connected to the primary of the relevant replica set?&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="439427" author="vinod.k" created="Fri, 11 Oct 2013 05:41:12 +0000"  >&lt;p&gt;We also found that  reads for some reason in secondaryPreffered mode always goes to primary . But it works well with secondary .&lt;/p&gt;</comment>
                            <comment id="438941" author="jesse" created="Thu, 10 Oct 2013 15:54:34 +0000"  >&lt;p&gt;Sorry, this is a problem with the documentation. The behavior you observe is correct: if no secondaries match your tags, mongos and the drivers should ignore tags and read from the primary. I&apos;ve submitted a patch to the documentation.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="93663">DOCS-2068</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="94626">SERVER-11240</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>18.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 10 Oct 2013 15:54:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 15 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/DOCS-2068'>DOCS-2068</a></s>]]></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>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 15 weeks, 5 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="10020"><![CDATA[Linux]]></customfieldvalue>

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

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>85683</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Our test env is a mongos router with 2 shards - 3 mongod&apos;s and one arbiter  per shard  and&lt;/p&gt;

&lt;p&gt;Query generated from Java App . using 2.11.2 driver  using tagged secondary preffered mode &lt;/p&gt;</customfieldvalue>

                        </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|hsp913:</customfieldvalue>

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