<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:39:09 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>[GODRIVER-2689] Simplify the &quot;readpref&quot; API</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2689</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;The &lt;tt&gt;readpref&lt;/tt&gt; package and types use a lot of unnecessary APIs that can confuse users. We should remove the functional options pattern and just export all fields in the &lt;tt&gt;ReadPref&lt;/tt&gt; struct so users can set them directly. Any field that has a corresponding &quot;Set&quot; field to indicate whether the value was set or not should be an exported pointer value instead (e.g. &lt;tt&gt;maxStaleness time.Duration&lt;/tt&gt; and &lt;tt&gt;maxStalenessSet bool&lt;/tt&gt; should be replaced with &lt;tt&gt;MaxStaleness *time.Duration&lt;/tt&gt;).&lt;/p&gt;

&lt;p&gt;Also, some exported values or functions do not need to be exported:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;ErrInvalidTagSet&lt;/tt&gt; - Unless users are dynamically building read preferences at run time, these error are unrecoverable and do not need to support special conditional logic (e.g. &lt;tt&gt;if err == ErrInvalidTagSet&lt;/tt&gt;).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Definition of done:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Export all fields in the &lt;tt&gt;ReadPref&lt;/tt&gt; struct.
	&lt;ul&gt;
		&lt;li&gt;Do not export &lt;tt&gt;maxStalenessSet&lt;/tt&gt;, but change type of &lt;tt&gt;MaxStaleness&lt;/tt&gt; to &lt;tt&gt;*time.Duration&lt;/tt&gt; instead.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;Remove &lt;tt&gt;Option&lt;/tt&gt; type and all &lt;tt&gt;Option&lt;/tt&gt; functions.&lt;/li&gt;
	&lt;li&gt;Update the &lt;tt&gt;readpref.Primary&lt;/tt&gt; shortcut function to create a new &lt;tt&gt;ReadPref&lt;/tt&gt; on each call since users can modify the returned struct.&lt;/li&gt;
	&lt;li&gt;Remove &lt;tt&gt;Mode.IsValid&lt;/tt&gt;, which has a single use case in the Go driver, which can be replaced by a switch condition in that one place.&lt;/li&gt;
	&lt;li&gt;Remove or unexport all exported error values.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="2208878">GODRIVER-2689</key>
            <summary>Simplify the &quot;readpref&quot; API</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="matt.dale@mongodb.com">Matt Dale</reporter>
                        <labels>
                    </labels>
                <created>Mon, 12 Dec 2022 21:13:47 +0000</created>
                <updated>Mon, 8 Jan 2024 21:13:21 +0000</updated>
                                                            <fixVersion>2.0.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="5383293" author="xgen-internal-githook" created="Thu, 27 Apr 2023 23:43:44 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Matt Dale&apos;, &apos;email&apos;: &apos;9760375+matthewdale@users.noreply.github.com&apos;, &apos;username&apos;: &apos;matthewdale&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2689&quot; title=&quot;Simplify the &amp;quot;readpref&amp;quot; API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2689&quot;&gt;GODRIVER-2689&lt;/a&gt; Always return a distinct Primary read preference. (#1233)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/741b0ed7a2e8ff15e53fa3a98d25f49a0279bfe9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/741b0ed7a2e8ff15e53fa3a98d25f49a0279bfe9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5354357" author="JIRAUSER1259527" created="Tue, 18 Apr 2023 01:16:58 +0000"  >&lt;p&gt;It&apos;s not possible to do this ahead of Go Driver 2.0 because there are too many name collisions. Moving this to the Go Driver 2.0 epic.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="2213442">GODRIVER-2696</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="738621">GODRIVER-964</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10012"><![CDATA[Major 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_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>GODRIVER-1787</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6jqv:s0000yzu7i</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>