<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:12:51 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>[CDRIVER-1546] What is the expected direction for client/pool options?</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-1546</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;The current configuration approach varies:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Some configuration options may only be set in the URI; e.g. &lt;tt&gt;sockettimeoutms&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;Some configuration options may only be set via code; e.g. SSL options&lt;/li&gt;
	&lt;li&gt;Some configuration options may be set either way: e.g. appname, minimum pool size&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Do you have a sense for which of these models will be more common in the future?&lt;/p&gt;

&lt;p&gt;Do you expect that options for a pool will always remain a superset of the options for a client?&lt;/p&gt;</description>
                <environment></environment>
        <key id="316822">CDRIVER-1546</key>
            <summary>What is the expected direction for client/pool options?</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="david.golden@mongodb.com">David Golden</reporter>
                        <labels>
                    </labels>
                <created>Fri, 16 Sep 2016 18:45:38 +0000</created>
                <updated>Wed, 11 Sep 2019 19:05:15 +0000</updated>
                            <resolved>Mon, 19 Sep 2016 23:46:59 +0000</resolved>
                                                    <fixVersion>1.5.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1388219" author="david.golden" created="Mon, 19 Sep 2016 23:46:45 +0000"  >&lt;p&gt;Great. I think we&apos;ve got what we need to make decisions.  Thank you &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bjori&quot; class=&quot;user-hover&quot; rel=&quot;bjori&quot;&gt;bjori&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1388217" author="jesse" created="Mon, 19 Sep 2016 23:43:05 +0000"  >&lt;p&gt;No, I don&apos;t have a sense of which will be more common. As Hannes said, it depends on what the feature &lt;b&gt;is&lt;/b&gt;: if it can be set in the URI, we&apos;ll add it to the URI. If it can&apos;t be set in the URI, we&apos;ll add a function. If it can be set in the URI but it would be useful to provide a function, we&apos;ll add it to the URI and also provide a function.&lt;/p&gt;

&lt;p&gt;Changing SSL options after you&apos;ve begun opening connections is obviously a bad idea. =) Please refer again to &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-938&quot; title=&quot;Prohibit setting options on pooled clients&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-938&quot;&gt;CDRIVER-938&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1388198" author="david.golden" created="Mon, 19 Sep 2016 23:33:40 +0000"  >&lt;blockquote&gt;&lt;p&gt;Do you have a sense for which of these models will be more common in the future?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I think that&apos;s the only question not directly addressed.  Saying &quot;sometimes we also add functions for configuration&quot; leaves it pretty wide open.  We&apos;re just trying to understand if the C driver is moving generally towards &quot;more knobs&quot; to set things in the application since recent additions seem to favoring that approach.   If the idea is that it will be handled case-by-case, that&apos;s fine, too, and we&apos;ll consider that in our own design.&lt;/p&gt;

&lt;p&gt;I&apos;m also a bit surprised that SSL options are mutable.  Does that mean that someone could change PEM files and new connections (pool or reconnect) would use the new credentials?  Could there be a pool situation with some clients with old and new PEM files at the same time?  (Feature or a bug?)&lt;/p&gt;</comment>
                            <comment id="1388107" author="jesse" created="Mon, 19 Sep 2016 21:38:24 +0000"  >&lt;p&gt;Yes pool options must be a superset of client options. If we added a client option that you couldn&apos;t set on a pool, then there&apos;d be no way to use it in pooled mode, since you shouldn&apos;t change the configuration of pooled clients (&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-938&quot; title=&quot;Prohibit setting options on pooled clients&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-938&quot;&gt;CDRIVER-938&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Our philosophy is, &quot;configuration is set in the URI unless it can&apos;t be set there, and sometimes we also add functions for configuration&quot;. In &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-809&quot; title=&quot;Default pool size parameters are &amp;quot;inconvenient&amp;quot; to say the least&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-809&quot;&gt;&lt;del&gt;CDRIVER-809&lt;/del&gt;&lt;/a&gt; we added pool size URI options as well as functions. Notice that the functions can &lt;b&gt;change&lt;/b&gt; configuration while a pool is in use. In &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1326&quot; title=&quot;Design POC for The MongoDB Handshake Protocol&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1326&quot;&gt;&lt;del&gt;CDRIVER-1326&lt;/del&gt;&lt;/a&gt; we added an &quot;appname&quot; URI option, but no URI option for &lt;tt&gt;mongoc_set_client_metadata&lt;/tt&gt; since you shouldn&apos;t set the system metadata in your URI.&lt;/p&gt;

&lt;p&gt;Other specific questions?&lt;/p&gt;</comment>
                            <comment id="1387689" author="bjori" created="Mon, 19 Sep 2016 17:23:55 +0000"  >&lt;p&gt;I think the same answer applies. We are very pragmatic. It is really weird being forced to tune connection pool only with a connection string. A connection string may be set by a sysadmin, containing probably only hostname and credentials. It really annoying not having a way to provide ssl options here, we maybe should do something about that in the future.&lt;br/&gt;
Other things are really annoying only being able to set on the uri and needing therefore to manipulate connection string to tweak things.&lt;/p&gt;

&lt;p&gt;ReadPreferences, ReadConcern, WriteConcern, are all examples of specs that expect being able to set things both in connection uri and at various other levels.&lt;/p&gt;

&lt;p&gt;Maybe someone finds a usecase where you should be able to set serverselectiontimeoutms or heartbeatfrequencyms per op, and we&apos;ll adapt for that.&lt;/p&gt;

&lt;p&gt;On the other hand, setting allocators for example isn&apos;t going to be a connection string option.&lt;/p&gt;</comment>
                            <comment id="1387009" author="david.golden" created="Sun, 18 Sep 2016 03:10:17 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bjori&quot; class=&quot;user-hover&quot; rel=&quot;bjori&quot;&gt;bjori&lt;/a&gt;, IIRC, historically, the C driver configuration model appeared to be &quot;configuration is set in the URI unless it can&apos;t be set there&quot;.    At some point, this philosophy changed.  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-809&quot; title=&quot;Default pool size parameters are &amp;quot;inconvenient&amp;quot; to say the least&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-809&quot;&gt;&lt;del&gt;CDRIVER-809&lt;/del&gt;&lt;/a&gt; appears to be one case in point and &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1326&quot; title=&quot;Design POC for The MongoDB Handshake Protocol&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1326&quot;&gt;&lt;del&gt;CDRIVER-1326&lt;/del&gt;&lt;/a&gt; followed similarly.  Opening up non URI-base configuration then opens up questions of timing and immutability questions.&lt;/p&gt;

&lt;p&gt;It looks like some connection-oriented settings can&apos;t be changed after the handshake (e.g appname).  But it looks like other things (e.g. SSL opts) can.&lt;/p&gt;

&lt;p&gt;So I&apos;m asking &quot;is there a configuration model that guides libmongoc design decisions?&quot;  Or is it a stochastic design based on how the committer de jour reacts to feature requests and specs?  Should we expect other changes like &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-809&quot; title=&quot;Default pool size parameters are &amp;quot;inconvenient&amp;quot; to say the least&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-809&quot;&gt;&lt;del&gt;CDRIVER-809&lt;/del&gt;&lt;/a&gt; where convenience of setting things outside the URI is taken as a reason to add configuration functions?  If so, are you taking suggestions or do you already have a list of likely and unlikely candidates (or would you be willing to produce one)?&lt;/p&gt;

&lt;p&gt;The C++ driver team is trying to understand how best to model configuration with the least amount of impedance mismatch to libmongoc.  Our model to date has been minimal because the C driver offered minimal knobs.  To the extent you are offering more knobs, we may want to follow along &#8211; but we may also choose not to follow along if the selection of knobs is incomplete or haphazard (e.g. to forestall user requests for knobs that aren&apos;t easy or possible to translate to libmongoc.)&lt;/p&gt;

&lt;p&gt;Specifically with regard to pool configuration, we&apos;re trying to understand how to model pool options versus client options.  Right now, libmongoc pool configuration more or less duplicates client duplication, except for the addition of min/max pool size.  That suggests we might be able to model pool options as containing a client options model, plus pool-specific options.  However, if that superset approach isn&apos;t going to be maintained by libmongoc, then we may want to model pool options directly rather than via an intermediate client options model.&lt;/p&gt;

&lt;p&gt;So we&apos;re asking &quot;is libmongoc committing to ensure that pool configuration is a superset of client configuration&quot; (which seems likely) so we can resolve our own configuration modeling design questions.&lt;/p&gt;</comment>
                            <comment id="1386762" author="bjori" created="Fri, 16 Sep 2016 21:40:56 +0000"  >&lt;p&gt;Certain specifications requires possibility to set values as part of the connection string.&lt;br/&gt;
There is no standard way of setting SSL options across drivers, and there is no spec that defines SSL options. Currently, our connection string parsing mostly only supports options that specs declare, and things that other drivers generally support I guess.&lt;/p&gt;

&lt;p&gt;Certain specs make certain values, like appname, configurable both as part of connection string, and suggest allowing setting it on the client, as providing a value like appname would be weird in shared connection strings.&lt;/p&gt;


&lt;p&gt;Is there a specific options you are worried about support in the future?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="312534">CXX-1009</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </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|hspugf:</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>