<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:56 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>[JAVA-1165] Some DBCursor array methods may not close underlying cursor</title>
                <link>https://jira.mongodb.org/browse/JAVA-1165</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;It appears that 4 methods exposed on &lt;tt&gt;DBCursor&lt;/tt&gt; have the potential to not have the underlying cursor closed in the event of an IO error.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;itcount()&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;length()&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;toArray()&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;toArray(int)&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Note that exhausting a cursor causes the server-side cursor to be closed. Therefore on the one hand, 3 out of 4 methods above are fine on the happy path, and are only exposed in the case of an IO error. However &lt;tt&gt;toArray(int)&lt;/tt&gt; is more risky, since in this case the cursor may not be exhausted, either, depending on the &lt;tt&gt;int&lt;/tt&gt; argument value and length of the result set.&lt;/p&gt;</description>
                <environment></environment>
        <key id="130381">JAVA-1165</key>
            <summary>Some DBCursor array methods may not close underlying cursor</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="john.morales@mongodb.com">John Morales</assignee>
                                    <reporter username="john.morales@mongodb.com">John Morales</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 Apr 2014 13:57:56 +0000</created>
                <updated>Fri, 1 Aug 2014 14:36:16 +0000</updated>
                            <resolved>Wed, 16 Apr 2014 13:20:18 +0000</resolved>
                                    <version>2.12.0</version>
                                                    <component>Query Operations</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="678671" author="xgen-internal-githook" created="Fri, 1 Aug 2014 14:36:16 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1165&quot; title=&quot;Some DBCursor array methods may not close underlying cursor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1165&quot;&gt;&lt;del&gt;JAVA-1165&lt;/del&gt;&lt;/a&gt;: Also backing out the test&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/726354c3490381a5dad105e546b9611249d88416&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/726354c3490381a5dad105e546b9611249d88416&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="678670" author="xgen-internal-githook" created="Fri, 1 Aug 2014 14:36:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1165&quot; title=&quot;Some DBCursor array methods may not close underlying cursor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1165&quot;&gt;&lt;del&gt;JAVA-1165&lt;/del&gt;&lt;/a&gt;: Backing this change out, after deciding it&apos;s too risky to close the cursor before it&apos;s fully consumed&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/79a8b3e307bc80da16f6aaa0d2463ac30387eaa9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/79a8b3e307bc80da16f6aaa0d2463ac30387eaa9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="678669" author="xgen-internal-githook" created="Fri, 1 Aug 2014 14:36:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;john-morales&apos;, u&apos;name&apos;: u&apos;John Morales&apos;, u&apos;email&apos;: u&apos;john.morales@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1165&quot; title=&quot;Some DBCursor array methods may not close underlying cursor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1165&quot;&gt;&lt;del&gt;JAVA-1165&lt;/del&gt;&lt;/a&gt; ensure array and itcount methods always close cursor server side even on IO error&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/ac2242842b0c6399f7476f28e300fe45535a4714&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/ac2242842b0c6399f7476f28e300fe45535a4714&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="562830" author="xgen-internal-githook" created="Fri, 25 Apr 2014 13:56:05 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1165&quot; title=&quot;Some DBCursor array methods may not close underlying cursor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1165&quot;&gt;&lt;del&gt;JAVA-1165&lt;/del&gt;&lt;/a&gt;: Also backing out the test&lt;br/&gt;
Branch: 2.12.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/726354c3490381a5dad105e546b9611249d88416&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/726354c3490381a5dad105e546b9611249d88416&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="551539" author="xgen-internal-githook" created="Wed, 16 Apr 2014 13:20:35 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1165&quot; title=&quot;Some DBCursor array methods may not close underlying cursor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1165&quot;&gt;&lt;del&gt;JAVA-1165&lt;/del&gt;&lt;/a&gt;: Backing this change out, after deciding it&apos;s too risky to close the cursor before it&apos;s fully consumed&lt;br/&gt;
Branch: 2.12.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/79a8b3e307bc80da16f6aaa0d2463ac30387eaa9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/79a8b3e307bc80da16f6aaa0d2463ac30387eaa9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="551538" author="jeff.yemin" created="Wed, 16 Apr 2014 13:20:18 +0000"  >&lt;p&gt;Backed out the change, after discussing and determining it&apos;s too risky.&lt;/p&gt;</comment>
                            <comment id="550942" author="jeff.yemin" created="Wed, 16 Apr 2014 00:17:36 +0000"  >&lt;p&gt;Need to merge this in to 3.0.x branch&lt;/p&gt;</comment>
                            <comment id="550941" author="xgen-internal-githook" created="Wed, 16 Apr 2014 00:17:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;john-morales&apos;, u&apos;name&apos;: u&apos;John Morales&apos;, u&apos;email&apos;: u&apos;john.morales@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1165&quot; title=&quot;Some DBCursor array methods may not close underlying cursor&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1165&quot;&gt;&lt;del&gt;JAVA-1165&lt;/del&gt;&lt;/a&gt; ensure array and itcount methods always close cursor server side even on IO error&lt;br/&gt;
Branch: 2.12.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/ac2242842b0c6399f7476f28e300fe45535a4714&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/ac2242842b0c6399f7476f28e300fe45535a4714&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|hrg9ef:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8428</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>