<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:47 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-658] DBTCPConnector ignores readprefs for combination of legacy settings</title>
                <link>https://jira.mongodb.org/browse/JAVA-658</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;The method &lt;tt&gt;DBTCPConnector#call&lt;/tt&gt; incorrectly deals with read preferences when:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The read-preference on the DB or Mongo has been set to (the deprecated) &lt;tt&gt;ReadPreference.PRIMARY&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;The options on the collection or query have been set to include &lt;tt&gt;Bytes#QUERYOPTION_SLAVEOK&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The beginning of the method tests the passed &lt;tt&gt;readPref&lt;/tt&gt; against &lt;tt&gt;ReadPreference.primary()&lt;/tt&gt; using object equality, so the inferred use of &lt;tt&gt;ReadPreference.secondaryPreferred()&lt;/tt&gt; for &lt;tt&gt;slaveOk&lt;/tt&gt; queries is not triggered.&lt;/p&gt;


&lt;p&gt;The default read preference on the mongo is &lt;tt&gt;ReadPreference.primary()&lt;/tt&gt; in the v2.9.0 dist, so this bug only affects code written against older releases that explicitly set &lt;tt&gt;ReadPreference.PRIMARY&lt;/tt&gt; at some point.&lt;/p&gt;</description>
                <environment></environment>
        <key id="51949">JAVA-658</key>
            <summary>DBTCPConnector ignores readprefs for combination of legacy settings</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="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="matt.schemmel">Matt Schemmel</reporter>
                        <labels>
                    </labels>
                <created>Mon, 1 Oct 2012 17:04:21 +0000</created>
                <updated>Tue, 8 Jan 2013 19:13:43 +0000</updated>
                            <resolved>Sat, 20 Oct 2012 02:21:23 +0000</resolved>
                                    <version>2.9.0</version>
                                    <fixVersion>2.9.2</fixVersion>
                    <fixVersion>2.10.0</fixVersion>
                                    <component>API</component>
                                        <votes>1</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="234358" author="auto" created="Tue, 8 Jan 2013 19:13:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-01T21:39:10Z&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-658&quot; title=&quot;DBTCPConnector ignores readprefs for combination of legacy settings&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-658&quot;&gt;&lt;del&gt;JAVA-658&lt;/del&gt;&lt;/a&gt;: Making ReadPreference.primary == ReadPreference.primary() so that it&apos;s safe to do equality comparision&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/f4f0b840b4ce38913f4089b4e0e4a1c29a18dd4a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/f4f0b840b4ce38913f4089b4e0e4a1c29a18dd4a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="234341" author="auto" created="Tue, 8 Jan 2013 19:07:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-01T21:39:10Z&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-658&quot; title=&quot;DBTCPConnector ignores readprefs for combination of legacy settings&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-658&quot;&gt;&lt;del&gt;JAVA-658&lt;/del&gt;&lt;/a&gt;: Making ReadPreference.primary == ReadPreference.primary() so that it&apos;s safe to do equality comparision&lt;br/&gt;
Branch: 2.10.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/f4f0b840b4ce38913f4089b4e0e4a1c29a18dd4a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/f4f0b840b4ce38913f4089b4e0e4a1c29a18dd4a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="173355" author="auto" created="Wed, 10 Oct 2012 15:37:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-01T14:39:10-07:00&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-658&quot; title=&quot;DBTCPConnector ignores readprefs for combination of legacy settings&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-658&quot;&gt;&lt;del&gt;JAVA-658&lt;/del&gt;&lt;/a&gt;: Making ReadPreference.primary == ReadPreference.primary() so that it&apos;s safe to do equality comparision&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/7c3f31f354710479ac6f3f099a3c9caa90208e80&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/7c3f31f354710479ac6f3f099a3c9caa90208e80&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="172728" author="auto" created="Tue, 9 Oct 2012 01:30:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-10-01T14:39:10-07:00&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-658&quot; title=&quot;DBTCPConnector ignores readprefs for combination of legacy settings&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-658&quot;&gt;&lt;del&gt;JAVA-658&lt;/del&gt;&lt;/a&gt;: Making ReadPreference.primary == ReadPreference.primary() so that it&apos;s safe to do equality comparision&lt;br/&gt;
Branch: release-2.9.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/f4f0b840b4ce38913f4089b4e0e4a1c29a18dd4a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/f4f0b840b4ce38913f4089b4e0e4a1c29a18dd4a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="169934" author="jeff.yemin" created="Mon, 1 Oct 2012 18:02:05 +0000"  >&lt;p&gt;Good find Matt.  Thanks for the report.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrj8xj:</customfieldvalue>

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