<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:57:57 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-2737] Always set slaveOk for direct connections to replica set members</title>
                <link>https://jira.mongodb.org/browse/JAVA-2737</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;When an application creates a MongoClient instance that is a direct connection (topology type of &quot;Single&quot; in the parlance of the server selection &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#topology-type-single&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;specification&lt;/a&gt;) to a replica set member (e.g. &lt;tt&gt;new MongoClient(new ServerAddress(&quot;localhost&quot;, 27018))&lt;/tt&gt;, and the read preference mode is &lt;tt&gt;&quot;primary&quot;&lt;/tt&gt;, then messages sent to that server via that MongoClient should indicate that the server should execute them regardless of whether the server is the primary member of the replica set.&lt;/p&gt;

&lt;p&gt;For OP_QUERY (for MongoDB versions &amp;lt; 3.6), that means settings the &lt;tt&gt;slaveOk&lt;/tt&gt; wire protocol bit.&lt;/p&gt;

&lt;p&gt;For OP_MSG (for MongoDB versions &amp;gt;= 3.6), that means including a &lt;tt&gt;$readPreference&lt;/tt&gt; field with &lt;tt&gt;mode&lt;/tt&gt; of &lt;tt&gt;&quot;primaryPreferred&quot;&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="484155">JAVA-2737</key>
            <summary>Always set slaveOk for direct connections to replica set members</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="13201">Fixed</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 17 Jan 2018 21:50:38 +0000</created>
                <updated>Sat, 28 Oct 2023 11:23:00 +0000</updated>
                            <resolved>Mon, 22 Jan 2018 16:31:11 +0000</resolved>
                                    <version>3.6.0</version>
                                    <fixVersion>3.6.2</fixVersion>
                                    <component>Wire Protocol</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1781095" author="xgen-internal-githook" created="Mon, 22 Jan 2018 18:42:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2737&quot; title=&quot;Always set slaveOk for direct connections to replica set members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2737&quot;&gt;&lt;del&gt;JAVA-2737&lt;/del&gt;&lt;/a&gt;: Change functional test in SingleServerClusterTest so that it can execute on all supported server versions&lt;br/&gt;
Branch: 3.6.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/a034ec80ea3e1470860432b6ae7f261c5155611f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/a034ec80ea3e1470860432b6ae7f261c5155611f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1781091" author="xgen-internal-githook" created="Mon, 22 Jan 2018 18:40:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2737&quot; title=&quot;Always set slaveOk for direct connections to replica set members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2737&quot;&gt;&lt;del&gt;JAVA-2737&lt;/del&gt;&lt;/a&gt;: Change functional test in SingleServerClusterTest so that it can execute on all supported server versions&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/a1c07f80b5bf3fa44fe5c49e11a0d72498d4d0a1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/a1c07f80b5bf3fa44fe5c49e11a0d72498d4d0a1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1780814" author="xgen-internal-githook" created="Mon, 22 Jan 2018 16:31:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2737&quot; title=&quot;Always set slaveOk for direct connections to replica set members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2737&quot;&gt;&lt;del&gt;JAVA-2737&lt;/del&gt;&lt;/a&gt;: Don&apos;t include slaveOk or $readPreference for write operations&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/f07936e3ce43718cd3c4ae88155f1ae12df9a7c1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/f07936e3ce43718cd3c4ae88155f1ae12df9a7c1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1780813" author="xgen-internal-githook" created="Mon, 22 Jan 2018 16:31:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2737&quot; title=&quot;Always set slaveOk for direct connections to replica set members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2737&quot;&gt;&lt;del&gt;JAVA-2737&lt;/del&gt;&lt;/a&gt;: Change expectations for $readPreference in CommandMonitoringTest&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/0b72c1e84fa83724d0e1dec90f02a2a43b321022&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/0b72c1e84fa83724d0e1dec90f02a2a43b321022&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1780812" author="xgen-internal-githook" created="Mon, 22 Jan 2018 16:31:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2737&quot; title=&quot;Always set slaveOk for direct connections to replica set members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2737&quot;&gt;&lt;del&gt;JAVA-2737&lt;/del&gt;&lt;/a&gt;: Always set slaveOk for direct connections to replica set members&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;for OP_QUERY (for MongoDB versions &amp;lt; 3.6), that means settings the slaveOk wire protocol bit.&lt;/li&gt;
	&lt;li&gt;for OP_MSG (for MongoDB versions &amp;gt;= 3.6), that means including a $readPreference field with mode of &quot;primaryPreferred&quot;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/ac0bf14a6b782a5ee8620d2d2ef56cef258bda76&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/ac0bf14a6b782a5ee8620d2d2ef56cef258bda76&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1780810" author="xgen-internal-githook" created="Mon, 22 Jan 2018 16:31:00 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2737&quot; title=&quot;Always set slaveOk for direct connections to replica set members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2737&quot;&gt;&lt;del&gt;JAVA-2737&lt;/del&gt;&lt;/a&gt;: Add functional test&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/cc717fbc889de74b646b8c2290dbc9b8fb531b14&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/cc717fbc889de74b646b8c2290dbc9b8fb531b14&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1780802" author="xgen-internal-githook" created="Mon, 22 Jan 2018 16:27:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2737&quot; title=&quot;Always set slaveOk for direct connections to replica set members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2737&quot;&gt;&lt;del&gt;JAVA-2737&lt;/del&gt;&lt;/a&gt;: Don&apos;t include slaveOk or $readPreference for write operations&lt;br/&gt;
Branch: 3.6.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/c8d09062d228968dd070fe3957295a24e4ff7c1c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/c8d09062d228968dd070fe3957295a24e4ff7c1c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1780801" author="xgen-internal-githook" created="Mon, 22 Jan 2018 16:27:02 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2737&quot; title=&quot;Always set slaveOk for direct connections to replica set members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2737&quot;&gt;&lt;del&gt;JAVA-2737&lt;/del&gt;&lt;/a&gt;: Change expectations for $readPreference in CommandMonitoringTest&lt;br/&gt;
Branch: 3.6.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/baaea7a9f97e2c192fc62a84cf847b5792e7c894&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/baaea7a9f97e2c192fc62a84cf847b5792e7c894&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1780800" author="xgen-internal-githook" created="Mon, 22 Jan 2018 16:27:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2737&quot; title=&quot;Always set slaveOk for direct connections to replica set members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2737&quot;&gt;&lt;del&gt;JAVA-2737&lt;/del&gt;&lt;/a&gt;: Always set slaveOk for direct connections to replica set members&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;for OP_QUERY (for MongoDB versions &amp;lt; 3.6), that means settings the slaveOk wire protocol bit.&lt;/li&gt;
	&lt;li&gt;for OP_MSG (for MongoDB versions &amp;gt;= 3.6), that means including a $readPreference field with mode of &quot;primaryPreferred&quot;.&lt;br/&gt;
Branch: 3.6.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/cb5e5862bc173868df8c06724ec8a626741fda3f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/cb5e5862bc173868df8c06724ec8a626741fda3f&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1780799" author="xgen-internal-githook" created="Mon, 22 Jan 2018 16:26:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@10gen.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2737&quot; title=&quot;Always set slaveOk for direct connections to replica set members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-2737&quot;&gt;&lt;del&gt;JAVA-2737&lt;/del&gt;&lt;/a&gt;: Add functional test&lt;br/&gt;
Branch: 3.6.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/1b5b59f574080e646aaf4454007551a7f8682c47&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/1b5b59f574080e646aaf4454007551a7f8682c47&lt;/a&gt;&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_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|htfoqf:</customfieldvalue>

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