<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:18:02 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-3438] Destroy exhaust cursor socket in mongoc_cursor_destroy regardless of client generation</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3438</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;When &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2857&quot; title=&quot;Provide a reset method to be called on clients after forking&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2857&quot;&gt;&lt;del&gt;CDRIVER-2857&lt;/del&gt;&lt;/a&gt; introduced the &lt;tt&gt;mongoc_client_reset()&lt;/tt&gt; method, it added logic to &lt;tt&gt;mongoc_cursor_destroy()&lt;/tt&gt; that skipped two actions if the client generation differed:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Disconnect the socket for an active exhaust cursor&lt;/li&gt;
	&lt;li&gt;Send a &lt;tt&gt;killCursors&lt;/tt&gt; command for an active, normal cursor&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;At the time, &lt;tt&gt;mongoc_client_reset()&lt;/tt&gt; also &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/500f49c580f4de339d850bb6d83c02afedbdf33d#diff-2993b51b4ff67a08dc4dea28aa26289eR2834&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;disconnected all nodes in the cluster&lt;/a&gt;, so the fact that &lt;tt&gt;mongoc_cursor_destroy()&lt;/tt&gt; did &lt;em&gt;not&lt;/em&gt; disconnect the socket for an active exhaust cursor was not important.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3116&quot; title=&quot;Do not disconnect sockets in mongoc_client_reset()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3116&quot;&gt;&lt;del&gt;CDRIVER-3116&lt;/del&gt;&lt;/a&gt; later changed &lt;tt&gt;mongoc_client_reset()&lt;/tt&gt; such that sockets are left alone. I believe this means that users of exhaust cursors will no way of avoiding an error in a child process when attempting to re-use a socket from a parent that previously opened an exhaust cursor.&lt;/p&gt;

&lt;p&gt;This may not be a significant issue, as our take-away from &lt;a href=&quot;https://jira.mongodb.org/browse/PHPC-1274&quot; title=&quot;Reset libmongoc client after forking to avoid interacting with parent resources in child processes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PHPC-1274&quot;&gt;&lt;del&gt;PHPC-1274&lt;/del&gt;&lt;/a&gt; was that &lt;tt&gt;mongoc_client_reset()&lt;/tt&gt; was mainly useful as a means to prevent children from destroying cursors owned by a parent and/or re-using session IDs from a parent. There was not stated goal of allowing a child process to continue using sockets from a parent&apos;s client, and I believe doing so would likely lead to an out-of-sequence wire protocol error since processes might read each other&apos;s responses unexpectedly.&lt;/p&gt;

&lt;p&gt;Having said that, I&apos;m curious if we should allow &lt;tt&gt;mongoc_cursor_destroy()&lt;/tt&gt; to still disconnect a socket for an active exhaust cursor regardless of the client&apos;s generation.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1026182">CDRIVER-3438</key>
            <summary>Destroy exhaust cursor socket in mongoc_cursor_destroy regardless of client generation</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="13201">Fixed</resolution>
                                        <assignee username="kevin.albertson@mongodb.com">Kevin Albertson</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Nov 2019 17:58:10 +0000</created>
                <updated>Sat, 28 Oct 2023 11:29:01 +0000</updated>
                            <resolved>Thu, 16 Jan 2020 19:49:38 +0000</resolved>
                                    <version>1.16.0</version>
                                    <fixVersion>1.16.0</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="2735631" author="xgen-internal-githook" created="Thu, 16 Jan 2020 19:48:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Kevin Albertson&apos;, &apos;email&apos;: &apos;kevin.albertson@mongodb.com&apos;, &apos;username&apos;: &apos;kevinAlbs&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3438&quot; title=&quot;Destroy exhaust cursor socket in mongoc_cursor_destroy regardless of client generation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3438&quot;&gt;&lt;del&gt;CDRIVER-3438&lt;/del&gt;&lt;/a&gt; destroy exhaust socket on reset&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/ab514aeb40a79c5902a08c18d39f2b361f94cdac&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/ab514aeb40a79c5902a08c18d39f2b361f94cdac&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1098036">CDRIVER-3487</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="759752">CDRIVER-3116</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="620080">CDRIVER-2857</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="610201">PHPC-1274</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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvms13:</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>