<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:42: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>[CSHARP-2373] GridFSForwardOnlyUploadStream not closing properly on .NET Standard 2+ when cast to Stream before calling Close</title>
                <link>https://jira.mongodb.org/browse/CSHARP-2373</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Consider the following code:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;var dst = bucket.OpenUploadStream(srcFile.Name);&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;srcFile.OpenRead().CopyTo(dst);&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;// dst.Close(); &lt;b&gt;// Correctly writes fs.files collection&lt;/b&gt;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;((Stream)dst).Close(); &lt;font color=&quot;#FF0000&quot;&gt;&lt;b&gt;// Does NOT write to fs.files&lt;/b&gt;&#160;&lt;/font&gt;&lt;/tt&gt;&lt;font color=&quot;#FF0000&quot;&gt;&lt;b&gt;&lt;tt&gt;collection&lt;/tt&gt;&lt;/b&gt;&lt;/font&gt;{{}}&lt;/p&gt;

&lt;p&gt;Looks like it&apos;s missing Close() override for NETSTANDARD2_0 that&apos;ll close the wrapped stream?&#160; GridFSUploadStreamCompat.cs Line 80&lt;/p&gt;

&lt;p&gt;This leads to some pretty difficult to diagnose issues when the stream is used in any number of generic libraries that works against the Stream interface.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>.NET Standard 2+</environment>
        <key id="598463">CSHARP-2373</key>
            <summary>GridFSForwardOnlyUploadStream not closing properly on .NET Standard 2+ when cast to Stream before calling Close</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="peterhuang">Peter Huang</reporter>
                        <labels>
                    </labels>
                <created>Sat, 1 Sep 2018 15:42:33 +0000</created>
                <updated>Sat, 28 Oct 2023 11:48:56 +0000</updated>
                            <resolved>Wed, 31 Oct 2018 15:04:23 +0000</resolved>
                                    <version>2.7.0</version>
                                    <fixVersion>2.7.1</fixVersion>
                                    <component>GridFS</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="2053736" author="xgen-internal-githook" created="Tue, 6 Nov 2018 20:28:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;, &apos;username&apos;: &apos;rstam&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2373&quot; title=&quot;GridFSForwardOnlyUploadStream not closing properly on .NET Standard 2+ when cast to Stream before calling Close&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2373&quot;&gt;&lt;del&gt;CSHARP-2373&lt;/del&gt;&lt;/a&gt;: GridFSForwardOnlyUploadStream not closing properly on .NET Standard 2+ when cast to Stream before calling Close.&lt;br/&gt;
Branch: v2.7.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/bc07e5fcb432239279cf790ad41d7d61e33a745c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/bc07e5fcb432239279cf790ad41d7d61e33a745c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2047470" author="xgen-internal-githook" created="Wed, 31 Oct 2018 14:55:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;, &apos;username&apos;: &apos;rstam&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2373&quot; title=&quot;GridFSForwardOnlyUploadStream not closing properly on .NET Standard 2+ when cast to Stream before calling Close&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2373&quot;&gt;&lt;del&gt;CSHARP-2373&lt;/del&gt;&lt;/a&gt;: GridFSForwardOnlyUploadStream not closing properly on .NET Standard 2+ when cast to Stream before calling Close.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/0685c54c50c36b2e9f9937100060c507df1b232c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/0685c54c50c36b2e9f9937100060c507df1b232c&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <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|htxgov:</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>