<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:48:03 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-4377] GridFSDownloadStream.Flush must not throw NotSupportedException</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4377</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;The Flush method of GridFSDownloadStream throws NotSupportedException. This is incorrect according to the .NET System.IO.Stream.Flush man page at &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.flush?view=net-6.0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.flush?view=net-6.0.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The man page states: &quot;In a class derived from&#160;&lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.io.stream?view=net-6.0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Stream&lt;/a&gt;&#160;that doesn&apos;t support writing,&#160;&lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.io.stream.flush?view=net-6.0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Flush&lt;/a&gt;&#160;is typically implemented as an empty method to ensure full compatibility with other&#160;&lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.io.stream?view=net-6.0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Stream&lt;/a&gt; types since &lt;ins&gt;&lt;b&gt;it&apos;s valid to flush a read-only stream&lt;/b&gt;&lt;/ins&gt;.&quot;&lt;/p&gt;

&lt;p&gt;See below for a real-life case where this is a problem&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Pleaseprovidetheversionofthedriver.Ifapplicable%2CpleaseprovidetheMongoDBserverversionandtopology%28standalone%2Creplicaset%2Corshardedcluster%29.&quot;&gt;&lt;/a&gt;Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).&lt;/h4&gt;

&lt;p&gt;2.17.1&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;Pass a GridFSDownloadStream as input stream to a .NET CryptoStream in read mode. The CryptoStream&apos;s Dispose() method calls Flush() on the input stream, which causes the NotSupportedException to be thrown.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Please provide any additional background information that may be helpful in diagnosing the bug.&lt;/em&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2164706">CSHARP-4377</key>
            <summary>GridFSDownloadStream.Flush must not throw NotSupportedException</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="james.kovacs@mongodb.com">James Kovacs</assignee>
                                    <reporter username="rhmboerdijk@gmail.com">Robin Boerdijk</reporter>
                        <labels>
                    </labels>
                <created>Sat, 22 Oct 2022 13:06:37 +0000</created>
                <updated>Sat, 28 Oct 2023 11:47:03 +0000</updated>
                            <resolved>Thu, 24 Nov 2022 21:06:39 +0000</resolved>
                                                    <fixVersion>2.19.0</fixVersion>
                                    <component>GridFS</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5006918" author="xgen-internal-githook" created="Thu, 24 Nov 2022 21:06:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;James Kovacs&apos;, &apos;email&apos;: &apos;jkovacs@post.harvard.edu&apos;, &apos;username&apos;: &apos;JamesKovacs&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4377&quot; title=&quot;GridFSDownloadStream.Flush must not throw NotSupportedException&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4377&quot;&gt;&lt;del&gt;CSHARP-4377&lt;/del&gt;&lt;/a&gt;: Flush on read-only stream should be a NOP. (#971)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/1446eacb965605fb4b7c7a65a7c511a380bdd546&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/1446eacb965605fb4b7c7a65a7c511a380bdd546&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="241465">CSHARP-1488</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <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|i0xop4:</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>