<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:23:00 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>[DRIVERS-1186] Allow db/collection/index enumeration to respect read preference</title>
                <link>https://jira.mongodb.org/browse/DRIVERS-1186</link>
                <project id="10980" key="DRIVERS">Drivers</project>
                    <description>&lt;p&gt;There&apos;s a section in the spec that says listCollections and some other commands that read should go to the primary, ignoring read preference. There&apos;s no justification written that I can find. If we relax this and say that all commands that read obey read preference, it simplifies existing specs and removes a contradiction from the Transactions spec. (If we leave &quot;should-use-primary&quot; in place, then there&apos;s a problem when you run listCollections in a transaction that was begun with read preference secondary.)&lt;/p&gt;</description>
                <environment></environment>
        <key id="536725">DRIVERS-1186</key>
            <summary>Allow db/collection/index enumeration to respect read preference</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                            <label>leads-triage</label>
                    </labels>
                <created>Mon, 30 Apr 2018 21:23:27 +0000</created>
                <updated>Tue, 15 Mar 2022 18:21:28 +0000</updated>
                            <resolved>Mon, 14 Mar 2022 16:39:43 +0000</resolved>
                                                        <component>Server Selection</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4407420" author="benji.rewis" created="Fri, 11 Mar 2022 19:46:46 +0000"  >&lt;p&gt;This came up again recently in the Go driver with &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2317&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;GODRIVER-2317&lt;/a&gt;. I think it would be worth considering honoring the user&apos;s &lt;tt&gt;readPreference&lt;/tt&gt; for at least the &lt;tt&gt;list*&lt;/tt&gt; commands (or maybe even using &lt;tt&gt;primaryPreferred&lt;/tt&gt; instead of just &lt;tt&gt;primary&lt;/tt&gt;).&lt;/p&gt;</comment>
                            <comment id="3318724" author="jeff.yemin" created="Mon, 3 Aug 2020 22:10:51 +0000"  >&lt;p&gt;Thanks, Jesse.&lt;/p&gt;

&lt;p&gt;Closing as Won&apos;t Fix until we hear user pain with the current behavior.&lt;/p&gt;</comment>
                            <comment id="3318627" author="jesse" created="Mon, 3 Aug 2020 21:22:51 +0000"  >&lt;p&gt;I definitely have zero opinion about this now! Please close, or implement the change, or do whatever you prefer.&lt;/p&gt;</comment>
                            <comment id="1886322" author="jesse" created="Tue, 8 May 2018 20:28:45 +0000"  >&lt;p&gt;If you use runCommand for a command that drivers provide helpers for, you&apos;re on your own. That&apos;s a core principle of all our specs. You can cause problems executing this too:&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;runCommand({abortTransaction: 1})&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;However, I think I agree with you in this case that runCommand is the one exception to the change I proposed. Let&apos;s keep it as &quot;should-use-primary&quot;.&lt;/p&gt;</comment>
                            <comment id="1886269" author="jeff.yemin" created="Tue, 8 May 2018 19:50:39 +0000"  >&lt;p&gt;Won&apos;t changing runCommand semantics break compatibility?&#160; Consider&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;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;database.runCommand({insert: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;test&quot;&lt;/span&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;, documents : [{}]&#160;})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;&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;Currently this will execute on the primary no matter the read preference, but this change would make it a read operation and execute on a secondary when the database&apos;s read preference is secondary.&#160;&lt;/p&gt;</comment>
                            <comment id="1878646" author="jesse" created="Mon, 30 Apr 2018 23:28:23 +0000"  >&lt;p&gt;Let&apos;s start the list here:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;listCollections (Enumerating Collections spec and Server Selection spec)&lt;/li&gt;
	&lt;li&gt;listDatabases (Enumerating Databases spec)&lt;/li&gt;
	&lt;li&gt;listIndexes (Enumerating Indexes spec)&lt;/li&gt;
	&lt;li&gt;runCommand (Server Selection spec: don&apos;t inherit read pref from database, but allow read pref as a parameter)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Anything else? We&apos;ve long since decided that drivers obey read preference for mapreduce and aggregate regardless of their parameters.&lt;/p&gt;</comment>
                            <comment id="1878532" author="david.golden" created="Mon, 30 Apr 2018 21:52:16 +0000"  >&lt;p&gt;The justification is that &quot;they are intended to be run against primaries but would succeed against secondaries&quot;.  My recollection is that we felt that some things shouldn&apos;t be run against secondaries but that the server didn&apos;t historically prohibit it and we wanted to avoid users shooting themselves in the foot.  Though for all I know it was added only to accommodate existing specs.&lt;/p&gt;

&lt;p&gt;I have no strong feelings and I like simplification.  Do you have the complete list of commands to which this applies so we know what&apos;s affected?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1986188">GODRIVER-2317</issuekey>
        </issuelink>
                            </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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10951" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Driver Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10940"><![CDATA[Not Needed]]></customfieldvalue>

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