<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:54:10 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-1255] Add DBCursor.tryNext() method for tailable cursors</title>
                <link>https://jira.mongodb.org/browse/JAVA-1255</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;In 2.12, the Java driver started setting the AwaitData cursor flag any time the Tailable flag was set.  As part of this change, the driver stopped violating the Iterator contractor for cursors.  Whereas in previous versions of the driver, an Iterator for a cursor with Tailable but not AwaitData could return false from Iterator.hasNext(), and then some time later return true.    In 2.12, by contrast, Iterator.hasNext() for a Tailable cursor blocks until there is a result available or until the cursor has been closed.&lt;/p&gt;

&lt;p&gt;But this change breaks existing clients that were relying on the driver&apos;s breaking of the Iterator contract, so the change should be reverted.  The driver should allow Tailable without AwaitData, and Iterator.hasNext() for such a cursor will return false but not close the cursor, allowing hasNext() to be called again at a later time.&lt;/p&gt;

&lt;p&gt;Long term, the driver should offer a different API for tailable cursors (perhaps one without a hasNext() method), but this is a short term measure until we get there.&lt;/p&gt;

&lt;p&gt;UPDATE::&lt;/p&gt;

&lt;p&gt;DBCursor now has a tryNext method which may return null if no documents are available, and then return a document on a subsequent call.&lt;/p&gt;</description>
                <environment></environment>
        <key id="137720">JAVA-1255</key>
            <summary>Add DBCursor.tryNext() method for tailable cursors</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 22 May 2014 17:22:51 +0000</created>
                <updated>Fri, 25 Aug 2017 02:53:33 +0000</updated>
                            <resolved>Mon, 15 Sep 2014 10:23:50 +0000</resolved>
                                    <version>2.12.0</version>
                                    <fixVersion>2.13.0</fixVersion>
                    <fixVersion>3.0.0</fixVersion>
                                    <component>Query Operations</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="817931" author="xgen-internal-githook" created="Fri, 30 Jan 2015 18:43:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Fix DBCursor#tryNext support for curr() and numSeen()&lt;/p&gt;

&lt;p&gt;Missed in &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1255&quot; title=&quot;Add DBCursor.tryNext() method for tailable cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1255&quot;&gt;&lt;del&gt;JAVA-1255&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/6eecaad216b1c32e09b5ccc2d875c0378dc75e76&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/6eecaad216b1c32e09b5ccc2d875c0378dc75e76&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="817815" author="xgen-internal-githook" created="Fri, 30 Jan 2015 18:40:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Ensure next() and hasNext() behaviour doesn&apos;t change&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1255&quot; title=&quot;Add DBCursor.tryNext() method for tailable cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1255&quot;&gt;&lt;del&gt;JAVA-1255&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/e5fedfd8c18267c49ffc868c18604fe1e6812bad&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/e5fedfd8c18267c49ffc868c18604fe1e6812bad&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="817812" author="xgen-internal-githook" created="Fri, 30 Jan 2015 18:40:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Added tryNext() for tailable cursors&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1255&quot; title=&quot;Add DBCursor.tryNext() method for tailable cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1255&quot;&gt;&lt;del&gt;JAVA-1255&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/8347cf51d87c8a43945bb596ad9fadb07dc795fa&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/8347cf51d87c8a43945bb596ad9fadb07dc795fa&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="816398" author="jeff.yemin" created="Thu, 29 Jan 2015 14:33:12 +0000"  >&lt;p&gt;2.13.0 has been released.  Closing issue.&lt;/p&gt;</comment>
                            <comment id="735455" author="xgen-internal-githook" created="Tue, 7 Oct 2014 13:28:30 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Fix DBCursor#tryNext support for curr() and numSeen()&lt;/p&gt;

&lt;p&gt;Missed in &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1255&quot; title=&quot;Add DBCursor.tryNext() method for tailable cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1255&quot;&gt;&lt;del&gt;JAVA-1255&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/6eecaad216b1c32e09b5ccc2d875c0378dc75e76&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/6eecaad216b1c32e09b5ccc2d875c0378dc75e76&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="713305" author="xgen-internal-githook" created="Mon, 8 Sep 2014 07:57:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Ensure next() and hasNext() behaviour doesn&apos;t change&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1255&quot; title=&quot;Add DBCursor.tryNext() method for tailable cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1255&quot;&gt;&lt;del&gt;JAVA-1255&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/e5fedfd8c18267c49ffc868c18604fe1e6812bad&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/e5fedfd8c18267c49ffc868c18604fe1e6812bad&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="712567" author="xgen-internal-githook" created="Fri, 5 Sep 2014 17:23:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Ensure next() and hasNext() behaviour doesn&apos;t change&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1255&quot; title=&quot;Add DBCursor.tryNext() method for tailable cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1255&quot;&gt;&lt;del&gt;JAVA-1255&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/a11aec7cfff3af5a22afa7ebbb9943d50165198d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/a11aec7cfff3af5a22afa7ebbb9943d50165198d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="712201" author="xgen-internal-githook" created="Fri, 5 Sep 2014 09:22:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Added tryNext() for tailable cursors&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1255&quot; title=&quot;Add DBCursor.tryNext() method for tailable cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1255&quot;&gt;&lt;del&gt;JAVA-1255&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/8347cf51d87c8a43945bb596ad9fadb07dc795fa&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/8347cf51d87c8a43945bb596ad9fadb07dc795fa&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="712183" author="xgen-internal-githook" created="Fri, 5 Sep 2014 08:11:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rozza&apos;, u&apos;name&apos;: u&apos;Ross Lawley&apos;, u&apos;email&apos;: u&apos;ross.lawley@gmail.com&apos;}
&lt;p&gt;Message: Added tryNext() for tailable cursors&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1255&quot; title=&quot;Add DBCursor.tryNext() method for tailable cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1255&quot;&gt;&lt;del&gt;JAVA-1255&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/019af845fca4823fbd3d70905bc97b31070a7ee3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/019af845fca4823fbd3d70905bc97b31070a7ee3&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="150232">JAVA-1326</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="107338">JAVA-1091</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|hrf8dr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1216</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="202">Sprint 4 - June 16 - July 3</customfieldvalue>
    <customfieldvalue id="264">Java Sprint 7</customfieldvalue>
    <customfieldvalue id="265">Java Sprint 8</customfieldvalue>

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