<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:10:33 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-765] Seeking issues with GridFS file</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-765</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;There&apos;s two seek related issues with GridFS fixed by Pull Request &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/pull/251/files&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/pull/251/files&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1. If system tries to fetch a page with _mongoc_gridfs_file_refresh_page()  not available in cursor anymore, it will fail doing so because comparison to detect the range of available pages had &amp;lt; and &amp;gt; signs reverse in this code (diff from PR):&lt;/p&gt;

&lt;p&gt;      if (file-&amp;gt;cursor &amp;amp;&amp;amp;&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;!(file-&amp;gt;cursor_range&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; &amp;gt;= n &amp;amp;&amp;amp; file-&amp;gt;cursor_range&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &amp;lt;= n)) {&lt;br/&gt;
+          !(file-&amp;gt;cursor_range&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; &amp;lt;= n &amp;amp;&amp;amp; file-&amp;gt;cursor_range&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &amp;gt;= n)) 
{
          mongoc_cursor_destroy (file-&amp;gt;cursor);
          file-&amp;gt;cursor = NULL;
       }&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;2. When reading/writing into GridFSFile, if doing so exactly on blocks matching the chunk size, the proper chunk was not getting flushed to database because the calculation of chunk to flush overflowed into the next chunk because the pos field was pointing to the next byte to be written/read.&lt;/p&gt;

&lt;p&gt;The other diffs in the Pull Request try to address that issue by keeping track of &quot;how&quot; the pos field was updated: &lt;/p&gt;

&lt;p&gt;a. By direct seeking&lt;br/&gt;
b. By movement to next byte by read or write operation&lt;/p&gt;

&lt;p&gt;Depending on this state, we calculate number of page to flush by subtracting 1 (or not) to current pos field.&lt;/p&gt;</description>
                <environment>Any</environment>
        <key id="223029">CDRIVER-765</key>
            <summary>Seeking issues with GridFS file</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="kyle.suarez@mongodb.com">Kyle Suarez</assignee>
                                    <reporter username="jsbattig@convey.com">Jose Battig</reporter>
                        <labels>
                            <label>Bug</label>
                            <label>driver</label>
                            <label>pull-request</label>
                    </labels>
                <created>Tue, 28 Jul 2015 15:42:19 +0000</created>
                <updated>Wed, 18 Nov 2015 23:23:37 +0000</updated>
                            <resolved>Wed, 23 Sep 2015 03:14:54 +0000</resolved>
                                    <version>1.1.10</version>
                                    <fixVersion>1.3.0-beta0</fixVersion>
                                    <component>GridFS</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1040372" author="xgen-internal-githook" created="Tue, 22 Sep 2015 22:29:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@emptysquare.net&apos;}
&lt;p&gt;Message: Merge pull request #273 from ksuarz/bugfix/flush&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-765&quot; title=&quot;Seeking issues with GridFS file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-765&quot;&gt;&lt;del&gt;CDRIVER-765&lt;/del&gt;&lt;/a&gt; fix gridfs flush&lt;br/&gt;
Branch: 1.3.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/797f91bef011584a9ec537fcb13d2cb1a256f7f9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/797f91bef011584a9ec537fcb13d2cb1a256f7f9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1040371" author="xgen-internal-githook" created="Tue, 22 Sep 2015 22:29:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ksuarz&apos;, u&apos;name&apos;: u&apos;Kyle Suarez&apos;, u&apos;email&apos;: u&apos;ksuarz@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-765&quot; title=&quot;Seeking issues with GridFS file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-765&quot;&gt;&lt;del&gt;CDRIVER-765&lt;/del&gt;&lt;/a&gt; fix comments and type of page-&amp;gt;n&lt;/p&gt;

&lt;p&gt;Changed file-&amp;gt;n to be an int32_t to match the type in the server.&lt;/p&gt;

&lt;p&gt;Set the file&apos;s position and current page to zero on creation.&lt;/p&gt;

&lt;p&gt;Minor comment fixes.&lt;br/&gt;
Branch: 1.3.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/e6057faf8bfb9d4281949241a993bc1861bd3a32&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/e6057faf8bfb9d4281949241a993bc1861bd3a32&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1040370" author="xgen-internal-githook" created="Tue, 22 Sep 2015 22:29:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ksuarz&apos;, u&apos;name&apos;: u&apos;Kyle Suarez&apos;, u&apos;email&apos;: u&apos;ksuarz@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-765&quot; title=&quot;Seeking issues with GridFS file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-765&quot;&gt;&lt;del&gt;CDRIVER-765&lt;/del&gt;&lt;/a&gt; comment and style changes&lt;br/&gt;
Branch: 1.3.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/f15bafef1a81c7b03df3e5fda96ef775aeddf6bd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/f15bafef1a81c7b03df3e5fda96ef775aeddf6bd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1040369" author="xgen-internal-githook" created="Tue, 22 Sep 2015 22:29:35 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ksuarz&apos;, u&apos;name&apos;: u&apos;Kyle Suarez&apos;, u&apos;email&apos;: u&apos;ksuarz@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-765&quot; title=&quot;Seeking issues with GridFS file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-765&quot;&gt;&lt;del&gt;CDRIVER-765&lt;/del&gt;&lt;/a&gt; track gridfs file&apos;s chunk number&lt;/p&gt;

&lt;p&gt;Added a new field to mongoc_gridfs_file_t that keeps track of the file&apos;s&lt;br/&gt;
currently-loaded chunk number.&lt;br/&gt;
Branch: 1.3.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/214a5ffa4990c07f1c385ead785eb13b4bd3d161&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/214a5ffa4990c07f1c385ead785eb13b4bd3d161&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1040368" author="xgen-internal-githook" created="Tue, 22 Sep 2015 22:29:35 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jsbattig&apos;, u&apos;name&apos;: u&apos;Jose Sebastian Battig&apos;, u&apos;email&apos;: u&apos;jsbattig@convey.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-765&quot; title=&quot;Seeking issues with GridFS file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-765&quot;&gt;&lt;del&gt;CDRIVER-765&lt;/del&gt;&lt;/a&gt; fix incorrect sign comparison&lt;br/&gt;
Branch: 1.3.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/a8792fdaf259694c8c32d3e13dcaf028988cfb0f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/a8792fdaf259694c8c32d3e13dcaf028988cfb0f&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="230995">CDRIVER-870</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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="10038"><![CDATA[Fully Compatible]]></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|hre8jr:</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>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="699">C Driver 2015Q2 sprint 7</customfieldvalue>
    <customfieldvalue id="741">C Driver 2015Q2 sprint 8</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>