<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:52 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>[JAVA-701] Got Error &quot;unknown m/r field for sharding: $readPreference&quot; when querying a sharded cluster</title>
                <link>https://jira.mongodb.org/browse/JAVA-701</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I have recently setup a sharded cluster, but the shards are actually single nodes. The problem I&apos;m having is that when I query the `mongos` instance, reusing some code I know works against a single node I get:&lt;/p&gt;

&lt;p&gt;Exception in thread &quot;main&quot; com.mongodb.CommandResult$CommandFailure: command failed &lt;span class=&quot;error&quot;&gt;&amp;#91;mapreduce&amp;#93;&lt;/span&gt;: &lt;/p&gt;
{ &quot;serverUsed&quot; : &quot;project11.cs.st-andrews.ac.uk/138.251.214.135:27017&quot; , &quot;ok&quot; : 0.0 , &quot;errmsg&quot; : &quot;unknown m/r field for sharding: $readPreference&quot;}

&lt;p&gt;Note: I was performing an aggregate using the new aggregate framework.&lt;/p&gt;</description>
                <environment>Scientific Linux 6.2 (Carbon)</environment>
        <key id="57580">JAVA-701</key>
            <summary>Got Error &quot;unknown m/r field for sharding: $readPreference&quot; when querying a sharded cluster</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="4">Incomplete</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="chutsu">Chris Choi</reporter>
                        <labels>
                            <label>query</label>
                    </labels>
                <created>Tue, 27 Nov 2012 11:42:12 +0000</created>
                <updated>Sun, 10 Mar 2013 02:34:34 +0000</updated>
                            <resolved>Sun, 10 Mar 2013 02:34:34 +0000</resolved>
                                    <version>2.10.0</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="285428" author="jeff.yemin" created="Sun, 10 Mar 2013 02:34:34 +0000"  >&lt;p&gt;Please re-open if you are still experiencing this.&lt;/p&gt;</comment>
                            <comment id="215545" author="jeff.yemin" created="Sat, 15 Dec 2012 02:56:03 +0000"  >&lt;p&gt;Sorry for not responding to this earlier.  I think it&apos;s a duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-706&quot; title=&quot;Aggregate and mapReduce commands sent to mongos break when setting read preference&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-706&quot;&gt;&lt;del&gt;JAVA-706&lt;/del&gt;&lt;/a&gt;, which is fixed in 2.10.1.  Can you give it a try and let me know?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrks3z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>35014</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>