<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:35:21 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-964] make option type construction consistent with the options package (e.g. readpref, readconcern, writeconcern)</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-964</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;&lt;b&gt;Revised:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The mongo/options package uses chained-setters for constructing options.  But types referenced by mongo/options, such as WriteConcern, ReadConcern, etc., are constructed with functional options style.  Mixing styles confuses users and could be revised/replaced for consistency.&lt;/p&gt;

&lt;p&gt;Additionally, some types are defined within mongo/options (such as Credential, Collation, etc.) but others have their own package (e.g. readpref.ReadPref, etc.).  There is no obvious guide for what to expect to find where.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Original:&lt;/b&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;specifying writeconcern is difficult and confusing, and doesn&apos;t conform with the idiom established for options in the driver. It should be specifiable, perhaps with its own options type.&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="738621">GODRIVER-964</key>
            <summary>make option type construction consistent with the options package (e.g. readpref, readconcern, writeconcern)</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="sam.kleinman">Sam Kleinman</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Apr 2019 14:15:17 +0000</created>
                <updated>Mon, 19 Dec 2022 20:46:39 +0000</updated>
                            <resolved>Mon, 19 Dec 2022 20:46:39 +0000</resolved>
                                                                    <component>Options &amp;amp; Configuration</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5049173" author="JIRAUSER1259527" created="Mon, 12 Dec 2022 21:30:07 +0000"  >&lt;p&gt;I&apos;ve created tickets that describe proposed simplifications to the &lt;tt&gt;writeconcern&lt;/tt&gt;, &lt;tt&gt;readconcern&lt;/tt&gt;, and &lt;tt&gt;readpref&lt;/tt&gt; APIs (&lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2685&quot; title=&quot;Simplify &amp;quot;writeconcern&amp;quot; API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2685&quot;&gt;&lt;del&gt;GODRIVER-2685&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2686&quot; title=&quot;Simplify &amp;quot;readconcern&amp;quot; API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2686&quot;&gt;&lt;del&gt;GODRIVER-2686&lt;/del&gt;&lt;/a&gt;, &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;, respectively) that are currently part of the Go Driver 2.0 scope. Those tickets propose removing the &quot;functional options&quot; pattern completely in favor of just exporting all fields in the respective configuration structs. It doesn&apos;t recommend adding the &quot;chainable setters&quot; pattern because that seems redundant. If we determine that the &quot;chainable setters&quot; pattern is useful or required, we can add it in a later 2.x release.&lt;/p&gt;

&lt;p&gt;Concerning moving those packages to the &lt;tt&gt;options&lt;/tt&gt; package, it seems likely we&apos;d run into some namespace collisions. It&apos;s not clear that the obviousness and discoverability improvements would outweigh the possibly awkward naming plus the added 1.x-&amp;gt;2.0 migration pain. I recommend against merging these packages into the &lt;tt&gt;options&lt;/tt&gt; package.&lt;/p&gt;

&lt;p&gt;Edit: Moving to &quot;Needs Triage&quot; with the recommendation that we close this as &quot;Won&apos;t Fix&quot;.&lt;/p&gt;

&lt;p&gt;P.S. I think we should remove the &quot;chainable setters&quot; pattern from the &lt;tt&gt;options&lt;/tt&gt; package (maybe retaining un-chainable setters in a few cases) in favor of just setting struct fields. However, not many people have complained about the usability of the &quot;chainable setters&quot; pattern, so it&apos;s not clear if removing it in Go Driver 2.0 would be worth the added migration pain. The motivation is mostly from the Go Driver team because maintaining all of those setters can be a lot of work.&lt;/p&gt;</comment>
                            <comment id="2215284" author="samk" created="Tue, 16 Apr 2019 16:57:45 +0000"  >&lt;p&gt;I changed the title of the ticket.&lt;/p&gt;

&lt;p&gt;Discoverability and documentation were definitely a struggle. &lt;/p&gt;

&lt;p&gt;I&apos;m not sure there is a convention to get used to given the fact that there are multiple paradigms. It also renders the chainability less useful, because you have to construct the objects without chaining. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="1765860">GODRIVER-2034</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2208878">GODRIVER-2689</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2207853">GODRIVER-2685</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2207907">GODRIVER-2686</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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|htywjv:i</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>