<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:17:22 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-3201] Better clarify socket initialization behavior for single and pool APIs</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3201</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;In &lt;a href=&quot;https://groups.google.com/forum/#!topic/mongodb-user/oADJHZ8asbQ&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this mongodb-user thread&lt;/a&gt;, I ended up clarifying our documentation to advise a user on how the existing connection pool API can be primed with clients.&lt;/p&gt;

&lt;p&gt;Reading &lt;a href=&quot;http://mongoc.org/libmongoc/current/connection-pooling.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Connection Pooling&lt;/a&gt;, I realized that the we only fully discuss socket initialization for the single-threaded API. For the multi-threaded (i.e. pool) API, we mention that the first &lt;tt&gt;pop&lt;/tt&gt; initializes monitoring, but we say nothing about application sockets for popped clients being initialized.&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Addingexamplesforprimingaconnectionpool&quot;&gt;&lt;/a&gt;Adding examples for priming a connection pool&lt;/h3&gt;

&lt;p&gt;For the benefit of our users, it&apos;d be good to clarify how popped clients can be initialized. Perhaps a section with a code snippet demonstrating the pool-priming example I provided in the aforementioned mongodb-user thread would be helpful. We might show an example for a basic pop/push &lt;em&gt;just&lt;/em&gt; to initialize monitoring for a pool, and a second example to prime the pool with 10 clients (using a &lt;tt&gt;ping&lt;/tt&gt; command).&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Notingsocketinitializationbehaviorforsingle%2FmultithreadedAPIs&quot;&gt;&lt;/a&gt;Noting socket initialization behavior for single/multi-threaded APIs&lt;/h3&gt;

&lt;p&gt;I think the following docs for the single-threaded API  should mention that a client&apos;s shared monitoring/application sockets will be initialized on-demand (e.g. after a &lt;tt&gt;ping&lt;/tt&gt; command or the first operation):&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_client_new.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongoc.org/libmongoc/current/mongoc_client_new.html&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_client_new_from_uri.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongoc.org/libmongoc/current/mongoc_client_new_from_uri.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;For the multi-threaded API, it would be helpful if these pages mentioned some details from the Connection Pooling page. Namely, that monitoring (and its sockets) are initialized on the first pop, and a popped client&apos;s application sockets are initialized on-demand (e.g. &lt;tt&gt;ping&lt;/tt&gt; or other operation):&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_client_pool_pop.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongoc.org/libmongoc/current/mongoc_client_pool_pop.html&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_client_pool_try_pop.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongoc.org/libmongoc/current/mongoc_client_pool_try_pop.html&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_client_pool_new.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongoc.org/libmongoc/current/mongoc_client_pool_new.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The top-level &lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_client_t.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;mongoc_client_t&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_client_pool_t.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;mongoc_client_pool_t&lt;/tt&gt;&lt;/a&gt; pages already link to Connection Pooling, so I don&apos;t think those require any changes.&lt;/p&gt;</description>
                <environment></environment>
        <key id="810701">CDRIVER-3201</key>
            <summary>Better clarify socket initialization behavior for single and pool APIs</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                            <label>neweng</label>
                    </labels>
                <created>Fri, 21 Jun 2019 19:00:56 +0000</created>
                <updated>Thu, 31 Mar 2022 13:29:18 +0000</updated>
                                                                            <component>docs</component>
                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|huvncf:</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>