<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56: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-2301] Allow application to get db/collection/index list with any ReadPreferences</title>
                <link>https://jira.mongodb.org/browse/JAVA-2301</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;It is very common to use Secondary nodes to do some analytics jobs, and it is working perfectly with common query, since it is possible to use a readPreference (from the client or during a call)&lt;/p&gt;

&lt;p&gt;However the MongClient, MongoDatabase, and MongoCollection force a ReadPreference.primary() when listing schema information.&lt;/p&gt;

&lt;p&gt;This is blocking when the applications only have access to secondary nodes in a replicaset. &lt;/p&gt;

&lt;p&gt;We should add the ReadPreference as an optional parameter to schema read/list methods&lt;/p&gt;</description>
                <environment>Any</environment>
        <key id="314567">JAVA-2301</key>
            <summary>Allow application to get db/collection/index list with any ReadPreferences</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="-1">Unassigned</assignee>
                                    <reporter username="tgrall">Tug Grall</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Sep 2016 12:14:56 +0000</created>
                <updated>Fri, 16 Sep 2016 22:27:15 +0000</updated>
                            <resolved>Fri, 16 Sep 2016 22:27:15 +0000</resolved>
                                    <version>3.2.0</version>
                    <version>3.3.0</version>
                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1386815" author="jeff.yemin" created="Fri, 16 Sep 2016 22:27:15 +0000"  >&lt;p&gt;Hi Tug,&lt;/p&gt;

&lt;p&gt;Closing for now as Works as Designed, but if you have new information we can re-open it.&lt;/p&gt;


&lt;p&gt;Regards,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="1378218" author="tgrall" created="Wed, 7 Sep 2016 12:59:07 +0000"  >&lt;p&gt;I will look into the way my application (Apache Drill) connects to the cluster and be sure that it is using a direct connection when needed. Will come back to here or Drivers when I have more information.&lt;/p&gt;

&lt;p&gt;Note that in some of my test, I have only the secondary node running and in this case the operations are failing, since primary is not there at all.&lt;/p&gt;</comment>
                            <comment id="1378201" author="jeff.yemin" created="Wed, 7 Sep 2016 12:39:42 +0000"  >&lt;p&gt;Hi Tug,&lt;/p&gt;

&lt;p&gt;The Java driver is following the &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#use-of-read-preferences-with-commands&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;server selection specification&lt;/a&gt; in its treatment of read preference for these command helpers, so the current behavior is by design.  Given that, I&apos;m changing the issue type to New Feature.&lt;/p&gt;

&lt;p&gt;A common practice for analytics jobs is to make a &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#terms&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;direct connection&lt;/a&gt; to a (often hidden) secondary member of the replica set to ensure that the job never runs on the primary.  In this case, the command helpers will execute on the specified server regardless of the read preference.&lt;/p&gt;

&lt;p&gt;If you still feel strongly that the driver behavior should be changed as per your pull request, please open a ticket in the &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;DRIVERS&lt;/a&gt;l project, which we use for new feature requests that affect all of the MongoDB drivers.&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|hspi3j:</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>