<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:10: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-609] Stream handlers need to differentiate between closing a stream due to error or normal cleanup</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-609</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;The stream handler expose a way to destruct (close (if needed) and free) a stream resource &amp;#8211; but that doesn&apos;t tell you why it is requested at all.&lt;/p&gt;

&lt;p&gt;We need a way to differentiate between closing a stream due to error (e.g. connection failure, replicaset reconfigured without that node, invalid reply from server, ... ..) vs closing the stream due to normal cleanup routines (mongoc_destroy(), ...).&lt;/p&gt;

&lt;p&gt;The handling of these two cases is vastly different for language bindings, as in the first case the stream really needs to be killed dead - while in the second case it does not. The language binding may want to keep it around for other purposes &amp;#8211; or resume it for next client.&lt;/p&gt;

&lt;p&gt;This is especially important for the PHP bindings as we implement &quot;persistent streams&quot; across requests (and manager &amp;#8211; and background sdam checks).&lt;br/&gt;
We don&apos;t want to destroy these stream when destroying a client (which happens after every request) as the next client (for the next request) will be requesting the same stream very shortly.&lt;/p&gt;</description>
                <environment></environment>
        <key id="194666">CDRIVER-609</key>
            <summary>Stream handlers need to differentiate between closing a stream due to error or normal cleanup</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="bjori">Hannes Magnusson</assignee>
                                    <reporter username="bjori">Hannes Magnusson</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 Apr 2015 22:00:23 +0000</created>
                <updated>Wed, 7 Oct 2015 21:13:58 +0000</updated>
                            <resolved>Wed, 8 Apr 2015 21:06:25 +0000</resolved>
                                    <version>1.1.4</version>
                                    <fixVersion>1.2-beta0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1054531" author="xgen-internal-githook" created="Wed, 7 Oct 2015 21:13:58 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: Merge branch &apos;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;&apos; into 1.2.0-dev&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;:&lt;br/&gt;
  Fully implement the failed mongoc_stream handler for all our resoruces&lt;br/&gt;
  Remove unused mongoc_topology_scanner_rm() function&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;: Differenciate between a failed stream, and cleanup/destroy&lt;br/&gt;
  Fix padding after the introduction of `poll` in 9227e633&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1054530" author="xgen-internal-githook" created="Wed, 7 Oct 2015 21:13:58 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: Merge branch &apos;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;&apos; into 1.2.0-dev&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;:&lt;br/&gt;
  Fully implement the failed mongoc_stream handler for all our resoruces&lt;br/&gt;
  Remove unused mongoc_topology_scanner_rm() function&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;: Differenciate between a failed stream, and cleanup/destroy&lt;br/&gt;
  Fix padding after the introduction of `poll` in 9227e633&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1054529" author="xgen-internal-githook" created="Wed, 7 Oct 2015 21:13:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: Merge branch &apos;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;&apos; into 1.2.0-dev&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;:&lt;br/&gt;
  Fully implement the failed mongoc_stream handler for all our resoruces&lt;br/&gt;
  Remove unused mongoc_topology_scanner_rm() function&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;: Differenciate between a failed stream, and cleanup/destroy&lt;br/&gt;
  Fix padding after the introduction of `poll` in 9227e633&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1054528" author="xgen-internal-githook" created="Wed, 7 Oct 2015 21:13:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;: Differenciate between a failed stream, and cleanup/destroy&lt;/p&gt;

&lt;p&gt;This adds a new `failed` handler to the mongoc_stream_t, along with&lt;br/&gt;
mongoc_stream_failed().&lt;/p&gt;

&lt;p&gt;The failed handler shall be called when the stream truely needs to be&lt;br/&gt;
destroyed (due to errors, removal from topology, etc etc).&lt;br/&gt;
The destroy handler shall be called during normal _destroy() routines,&lt;br/&gt;
like mongoc_destroy().&lt;/p&gt;

&lt;p&gt;By default, for BC, if no failed handler is provided we will fallback&lt;br/&gt;
and call the `destroy` handler.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/1926413b45390887431bbfb0380631153c886b74&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/1926413b45390887431bbfb0380631153c886b74&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="876233" author="xgen-internal-githook" created="Wed, 8 Apr 2015 19:50:50 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: Merge branch &apos;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;&apos; into 1.2.0-dev&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;:&lt;br/&gt;
  Fully implement the failed mongoc_stream handler for all our resoruces&lt;br/&gt;
  Remove unused mongoc_topology_scanner_rm() function&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;: Differenciate between a failed stream, and cleanup/destroy&lt;br/&gt;
  Fix padding after the introduction of `poll` in 9227e633&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="876232" author="xgen-internal-githook" created="Wed, 8 Apr 2015 19:50:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: Merge branch &apos;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;&apos; into 1.2.0-dev&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;:&lt;br/&gt;
  Fully implement the failed mongoc_stream handler for all our resoruces&lt;br/&gt;
  Remove unused mongoc_topology_scanner_rm() function&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;: Differenciate between a failed stream, and cleanup/destroy&lt;br/&gt;
  Fix padding after the introduction of `poll` in 9227e633&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="876231" author="xgen-internal-githook" created="Wed, 8 Apr 2015 19:50:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: Merge branch &apos;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;&apos; into 1.2.0-dev&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;bjori-&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;:&lt;br/&gt;
  Fully implement the failed mongoc_stream handler for all our resoruces&lt;br/&gt;
  Remove unused mongoc_topology_scanner_rm() function&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;: Differenciate between a failed stream, and cleanup/destroy&lt;br/&gt;
  Fix padding after the introduction of `poll` in 9227e633&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/16ec797c7175f866e34a28eafac49bbf5b86bab5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="876230" author="xgen-internal-githook" created="Wed, 8 Apr 2015 19:50:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-609&quot; title=&quot;Stream handlers need to differentiate between closing a stream due to error or normal cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-609&quot;&gt;&lt;del&gt;CDRIVER-609&lt;/del&gt;&lt;/a&gt;: Differenciate between a failed stream, and cleanup/destroy&lt;/p&gt;

&lt;p&gt;This adds a new `failed` handler to the mongoc_stream_t, along with&lt;br/&gt;
mongoc_stream_failed().&lt;/p&gt;

&lt;p&gt;The failed handler shall be called when the stream truely needs to be&lt;br/&gt;
destroyed (due to errors, removal from topology, etc etc).&lt;br/&gt;
The destroy handler shall be called during normal _destroy() routines,&lt;br/&gt;
like mongoc_destroy().&lt;/p&gt;

&lt;p&gt;By default, for BC, if no failed handler is provided we will fallback&lt;br/&gt;
and call the `destroy` handler.&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/1926413b45390887431bbfb0380631153c886b74&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/1926413b45390887431bbfb0380631153c886b74&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="875249" author="bjori" created="Tue, 7 Apr 2015 22:11:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/pull/215&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/pull/215&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="194600">PHPC-231</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|hs7vqv:</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>