<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:45:37 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-3556] Reconsider server pinning in GridFS</title>
                <link>https://jira.mongodb.org/browse/CSHARP-3556</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;ul&gt;
	&lt;li&gt;Clarify if this functionality is needed, and if so clarify if it should have spec for.&lt;/li&gt;
	&lt;li&gt;Address the temporary patch introduced in&#160;SingleServerReadBinding by&lt;br/&gt;
 &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-3306&quot; title=&quot;Implement and Test Connection Pool Paused State &quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-3306&quot;&gt;&lt;del&gt;CSHARP-3306&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
 &#160;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="1675000">CSHARP-3556</key>
            <summary>Reconsider server pinning in GridFS</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="boris.dogadov@mongodb.com">Boris Dogadov</reporter>
                        <labels>
                            <label>FY22Q3</label>
                    </labels>
                <created>Thu, 8 Apr 2021 18:13:47 +0000</created>
                <updated>Thu, 31 Mar 2022 00:24:11 +0000</updated>
                                                                            <component>GridFS</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3710438" author="rstam" created="Fri, 9 Apr 2021 16:02:23 +0000"  >&lt;p&gt;Looking more closely at the C# driver code I see that we have two kinds of download streams:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;GridFSForwardOnlyDownloadStream&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;GridFSSeekableDownloadStream &lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;The first does in fact use a cursor. The second reads chunks one at a time.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="3710408" author="jeff.yemin" created="Fri, 9 Apr 2021 15:52:39 +0000"  >&lt;p&gt;I only see this in the spec:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Then, implementers retrieve all chunks with files_id equal to id, sorted in ascending order on &#8220;n&#8221;.&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="3710406" author="rstam" created="Fri, 9 Apr 2021 15:52:27 +0000"  >&lt;p&gt;I think the reason we don&apos;t use a cursor is that we model the GridFS download as a .NET `Stream` and we need to support skipping to an arbitrary location of the GridFS file.&lt;/p&gt;</comment>
                            <comment id="3710396" author="rstam" created="Fri, 9 Apr 2021 15:49:21 +0000"  >&lt;p&gt;Doesn&apos;t the spec say to not use a cursor and to read one chunk at a time?&lt;/p&gt;

&lt;p&gt;I can&apos;t remember why GridFS downloads were supposed to be done that way, but it might have had something to do with not keeping resources tied up at the server.&lt;/p&gt;

&lt;p&gt;Other than that... I see no reason not to use a cursor.&lt;/p&gt;</comment>
                            <comment id="3710279" author="jeff.yemin" created="Fri, 9 Apr 2021 15:07:21 +0000"  >&lt;p&gt;Interesting.  I looked at the Java driver and it uses a cursor to iterate the chunks, which implicitly ties you to a single secondary.  Does the C# driver do something different?&lt;/p&gt;</comment>
                            <comment id="3710258" author="rstam" created="Fri, 9 Apr 2021 14:58:32 +0000"  >&lt;p&gt;Just want to note the reason we currently pin when downloading a GridFS file from a secondary, it is to prevent failures when some secondaries are lagging.&lt;/p&gt;

&lt;p&gt;If a download starts successfully against an up-to-date secondary it could fail if reads for subsequent chunks happen to be routed to a lagging secondary that doesn&apos;t have those chunks yet.&lt;/p&gt;

&lt;p&gt;The GridFS spec does not address this scenario.&lt;/p&gt;

&lt;p&gt;Pinning to a secondary to avoid failures only works when connected directly to a replica set. When connecting through mongos we have not control over which secondary gets selected when reading a chunk.&lt;/p&gt;

&lt;p&gt;An alternative fallback mechanism might be to fall back to the primary when a secondary does not yet have the needed chunk.&lt;/p&gt;

&lt;p&gt;Or we could just remove the pinning and say any failures due to lagging secondaries are not our concern.&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|hr4a5j:</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>