<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:18:29 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-3587] Do not reuse server stream that becomes invalid on failure to end session</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3587</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;A mongoc_server_stream_t should not be reused after calling &lt;tt&gt;mongoc_cluster_run_command_monitored&lt;/tt&gt; on with the stream.&lt;/p&gt;

&lt;p&gt;In two situations, the stream will disconnect and be invalidated:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;a network error (&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/49a55e0966d599e09b702df5ae570e11ca23c1df/src/libmongoc/src/mongoc/mongoc-cluster.c#L277&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;example&lt;/a&gt;)&lt;/li&gt;
	&lt;li&gt;a &quot;not master&quot; or &quot;node is recovering error&quot; for pre 4.2 server (&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/49a55e0966d599e09b702df5ae570e11ca23c1df/src/libmongoc/src/mongoc/mongoc-cluster.c#L478-L481&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;When that happens, the server_stream for that operation is no longer valid. But we do not always account that correctly. &lt;/p&gt;

&lt;p&gt;_mongoc_write_opmsg (incorrectly) always ends unordered bulk operations on error because of &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3305&quot; title=&quot;OP_MSG unordered bulk writes should not stop upon first error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3305&quot;&gt;&lt;del&gt;CDRIVER-3305&lt;/del&gt;&lt;/a&gt;. Once that is resolved, it will need to handle the case of an invalidated server stream.&lt;/p&gt;

&lt;p&gt;_mongoc_write_opquery &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/49a55e0966d599e09b702df5ae570e11ca23c1df/src/libmongoc/src/mongoc/mongoc-write-command.c#L805-L811&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;only sets must_stop to true&lt;/a&gt; for what it deems is a network error (of which, that check might not be quite right if error labels were applied). But it does not handle the case of a &quot;not master&quot; or &quot;node is recovering&quot; error causing a disconnect.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1286960">CDRIVER-3587</key>
            <summary>Do not reuse server stream that becomes invalid on failure to end session</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="13201">Fixed</resolution>
                                        <assignee username="roberto.sanchez@mongodb.com">Roberto Sanchez</assignee>
                                    <reporter username="roberto.sanchez@mongodb.com">Roberto Sanchez</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 Mar 2020 18:57:14 +0000</created>
                <updated>Sat, 28 Oct 2023 11:28:50 +0000</updated>
                            <resolved>Wed, 25 Mar 2020 20:47:53 +0000</resolved>
                                                    <fixVersion>1.17.0-beta</fixVersion>
                    <fixVersion>1.17.0</fixVersion>
                                    <component>Bulk API</component>
                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3020065" author="xgen-internal-githook" created="Tue, 31 Mar 2020 20:52:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Roberto C. S&#225;nchez&apos;, &apos;email&apos;: &apos;roberto@connexer.com&apos;, &apos;username&apos;: &apos;rcsanchez97&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3587&quot; title=&quot;Do not reuse server stream that becomes invalid on failure to end session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3587&quot;&gt;&lt;del&gt;CDRIVER-3587&lt;/del&gt;&lt;/a&gt; use centralized check for valid stream&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/b9577cb172d31dc58095dc1b151a94096a87db24&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/b9577cb172d31dc58095dc1b151a94096a87db24&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3000074" author="xgen-internal-githook" created="Wed, 25 Mar 2020 20:47:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Roberto C. S&#225;nchez&apos;, &apos;username&apos;: &apos;rcsanchez97&apos;, &apos;email&apos;: &apos;roberto@connexer.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3587&quot; title=&quot;Do not reuse server stream that becomes invalid on failure to end session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3587&quot;&gt;&lt;del&gt;CDRIVER-3587&lt;/del&gt;&lt;/a&gt; do not reuse invalid server stream&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/f89afb0d9bc717b4267464912e2dfe67af8db095&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/f89afb0d9bc717b4267464912e2dfe67af8db095&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10720">
                    <name>Cloners</name>
                                            <outwardlinks description="clones">
                                        <issuelink>
            <issuekey id="890712">CDRIVER-3306</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                            <outwardlinks description="has to be done before">
                                        <issuelink>
            <issuekey id="890711">CDRIVER-3305</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="857698">CDRIVER-3239</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|hwye3r:</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>