<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:36:16 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>[GODRIVER-1374] Add TryNext API</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1374</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=eric.daniels&quot; class=&quot;user-hover&quot; rel=&quot;eric.daniels&quot;&gt;eric.daniels&lt;/a&gt; brought up a use case from Stitch for a &lt;tt&gt;TryNext&lt;/tt&gt; API for change streams. When Stitch creates a trigger on a relatively idle collection, &lt;tt&gt;Next&lt;/tt&gt; calls can block for so long that the last seen resume token stored by Stitch falls off the oplog, making it impossible to use the token for restarting the change stream if an unclean shutdown happens.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;TryNext&lt;/tt&gt; should be a non-blocking function that moves the cursor forward and attempts no more than 1 &lt;tt&gt;getMore&lt;/tt&gt;. It should return true if the cursor was iterated successfully and false if the cursor was closed, a &lt;tt&gt;getMore&lt;/tt&gt; attempt resulted in an error, or a &lt;tt&gt;getMore&lt;/tt&gt; attempt returned an empty batch.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt; suggested adding some sort of &lt;tt&gt;IsAlive&lt;/tt&gt; function to test if &lt;tt&gt;TryNext&lt;/tt&gt; should be called again after it returns false. We should also make sure to document that this should only be used with tailable cursors. Non-tailable cursors should use &lt;tt&gt;Next&lt;/tt&gt; instead.&lt;/p&gt;</description>
                <environment></environment>
        <key id="980925">GODRIVER-1374</key>
            <summary>Add TryNext API</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="13201">Fixed</resolution>
                                        <assignee username="divjot.arora@mongodb.com">Divjot Arora</assignee>
                                    <reporter username="divjot.arora@mongodb.com">Divjot Arora</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 Oct 2019 14:04:07 +0000</created>
                <updated>Sat, 28 Oct 2023 11:38:28 +0000</updated>
                            <resolved>Mon, 4 Nov 2019 22:14:05 +0000</resolved>
                                                    <fixVersion>1.2.0</fixVersion>
                                    <component>CRUD</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="2517250" author="xgen-internal-githook" created="Mon, 4 Nov 2019 22:13:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Divjot Arora&apos;, &apos;username&apos;: &apos;divjotarora&apos;, &apos;email&apos;: &apos;divjot.arora@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1374&quot; title=&quot;Add TryNext API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1374&quot;&gt;&lt;del&gt;GODRIVER-1374&lt;/del&gt;&lt;/a&gt; Add TryNext for cursors and change streams. (#210)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/e4f1e0ae0999a480c617112648d0e8b0e522d6b6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/e4f1e0ae0999a480c617112648d0e8b0e522d6b6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2509120" author="divjot.arora" created="Wed, 30 Oct 2019 20:19:48 +0000"  >&lt;p&gt;PR:&#160;&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/pull/210&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/pull/210&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|hvaolj:</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>