<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:54:49 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-1519] DBCursor finalizer should not hold on to the query results</title>
                <link>https://jira.mongodb.org/browse/JAVA-1519</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;DBCursor has a field that is populated with an instance of a class with a finalize() method, which is used to close a dangling cursor.  But the class is an inner class, and therefore references the DBCursor instance, which in turn references the last query batch.    This stresses out the garbage collector, which now has to keep all those objects alive until finalize() is called.&lt;/p&gt;

&lt;p&gt;A better design would be to make the class with the finalizer a static inner class that only references the cursor id and server address.&lt;/p&gt;</description>
                <environment></environment>
        <key id="165719">JAVA-1519</key>
            <summary>DBCursor finalizer should not hold on to the query results</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 Oct 2014 20:01:26 +0000</created>
                <updated>Fri, 30 Jan 2015 18:44:19 +0000</updated>
                            <resolved>Tue, 28 Oct 2014 13:23:23 +0000</resolved>
                                                    <fixVersion>2.13.0</fixVersion>
                    <fixVersion>3.0.0</fixVersion>
                                    <component>Query Operations</component>
                                        <votes>1</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="817971" author="xgen-internal-githook" created="Fri, 30 Jan 2015 18:44:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;evanchooly&apos;, u&apos;name&apos;: u&apos;Justin Lee&apos;, u&apos;email&apos;: u&apos;jlee@antwerkz.com&apos;}
&lt;p&gt;Message: Merge pull request #272 from jyemin/j1519&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1519&quot; title=&quot;DBCursor finalizer should not hold on to the query results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1519&quot;&gt;&lt;del&gt;JAVA-1519&lt;/del&gt;&lt;/a&gt;: DBCursor&apos;s OptionalFinalizer inner class is now static ...&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/642d65de08127e8dbaf3cbabf6a5ead3a7123ffb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/642d65de08127e8dbaf3cbabf6a5ead3a7123ffb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="817966" author="xgen-internal-githook" created="Fri, 30 Jan 2015 18:44:13 +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: DBCursor&apos;s OptionalFinalizer inner class is now static and only contains fields for a Mongo instance and a ServerCursor instance.&lt;br/&gt;
Doing this prevents it from holding references to the DBCursor state which it does not actually need, allowing the garbage collector&lt;br/&gt;
to reclaim that memory before the finalizer runs.&lt;/p&gt;

&lt;p&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1519&quot; title=&quot;DBCursor finalizer should not hold on to the query results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1519&quot;&gt;&lt;del&gt;JAVA-1519&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/7eb81d7a8391b7a7d5099ef900c2fea66c96e9ec&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/7eb81d7a8391b7a7d5099ef900c2fea66c96e9ec&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="816421" author="jeff.yemin" created="Thu, 29 Jan 2015 14:33:21 +0000"  >&lt;p&gt;2.13.0 has been released.  Closing issue.&lt;/p&gt;</comment>
                            <comment id="750245" author="xgen-internal-githook" created="Tue, 28 Oct 2014 13:05:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;evanchooly&apos;, u&apos;name&apos;: u&apos;Justin Lee&apos;, u&apos;email&apos;: u&apos;jlee@antwerkz.com&apos;}
&lt;p&gt;Message: Merge pull request #272 from jyemin/j1519&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1519&quot; title=&quot;DBCursor finalizer should not hold on to the query results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1519&quot;&gt;&lt;del&gt;JAVA-1519&lt;/del&gt;&lt;/a&gt;: DBCursor&apos;s OptionalFinalizer inner class is now static ...&lt;br/&gt;
Branch: 3.0.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/642d65de08127e8dbaf3cbabf6a5ead3a7123ffb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/642d65de08127e8dbaf3cbabf6a5ead3a7123ffb&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="750244" author="xgen-internal-githook" created="Tue, 28 Oct 2014 13:05:33 +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: DBCursor&apos;s OptionalFinalizer inner class is now static and only contains fields for a Mongo instance and a ServerCursor instance.&lt;br/&gt;
Doing this prevents it from holding references to the DBCursor state which it does not actually need, allowing the garbage collector&lt;br/&gt;
to reclaim that memory before the finalizer runs.&lt;/p&gt;

&lt;p&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1519&quot; title=&quot;DBCursor finalizer should not hold on to the query results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1519&quot;&gt;&lt;del&gt;JAVA-1519&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: 3.0.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/7eb81d7a8391b7a7d5099ef900c2fea66c96e9ec&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/7eb81d7a8391b7a7d5099ef900c2fea66c96e9ec&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="750241" author="xgen-internal-githook" created="Tue, 28 Oct 2014 13:03:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;evanchooly&apos;, u&apos;name&apos;: u&apos;Justin Lee&apos;, u&apos;email&apos;: u&apos;jlee@antwerkz.com&apos;}
&lt;p&gt;Message: Merge pull request #274 from jyemin/&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1519&quot; title=&quot;DBCursor finalizer should not hold on to the query results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1519&quot;&gt;&lt;del&gt;JAVA-1519&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1519&quot; title=&quot;DBCursor finalizer should not hold on to the query results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1519&quot;&gt;&lt;del&gt;JAVA-1519&lt;/del&gt;&lt;/a&gt;: DBCursor&apos;s OptionalFinalizer inner class is now static and only contains fields necessary to kill the cursor&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/6d089c04174b941c24673c7ada88bfe69adb16ab&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/6d089c04174b941c24673c7ada88bfe69adb16ab&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="750240" author="xgen-internal-githook" created="Tue, 28 Oct 2014 13:03:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;evanchooly&apos;, u&apos;name&apos;: u&apos;Justin Lee&apos;, u&apos;email&apos;: u&apos;jlee@antwerkz.com&apos;}
&lt;p&gt;Message: Merge pull request #274 from jyemin/&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1519&quot; title=&quot;DBCursor finalizer should not hold on to the query results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1519&quot;&gt;&lt;del&gt;JAVA-1519&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1519&quot; title=&quot;DBCursor finalizer should not hold on to the query results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1519&quot;&gt;&lt;del&gt;JAVA-1519&lt;/del&gt;&lt;/a&gt;: DBCursor&apos;s OptionalFinalizer inner class is now static and only contains fields necessary to kill the cursor&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/6d089c04174b941c24673c7ada88bfe69adb16ab&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/6d089c04174b941c24673c7ada88bfe69adb16ab&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="750239" author="xgen-internal-githook" created="Tue, 28 Oct 2014 13:03:26 +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: DBCursor&apos;s OptionalFinalizer inner class is now static and only contains fields necessary to kill the cursor.&lt;br/&gt;
Doing this prevents it from holding references to the DBCursor state which it does not actually need, allowing the garbage collector&lt;br/&gt;
to reclaim that memory before the finalizer runs.&lt;/p&gt;

&lt;p&gt;     &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1519&quot; title=&quot;DBCursor finalizer should not hold on to the query results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1519&quot;&gt;&lt;del&gt;JAVA-1519&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/74ba7bfd9e39b73b1ab1e7b14cee553487e21fe5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/74ba7bfd9e39b73b1ab1e7b14cee553487e21fe5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="749898" author="jeff.yemin" created="Mon, 27 Oct 2014 22:25:31 +0000"  >&lt;ul&gt;
	&lt;li&gt;2.13: &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/pull/273&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/pull/273&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;3.0: &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/pull/272&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/pull/272&lt;/a&gt;&lt;/li&gt;
&lt;/ul&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|hs343z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>142972</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="321">Java Sprint 10</customfieldvalue>

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