<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:15:43 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-2594] Update docs for cursor_is_alive and consider deprecating</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-2594</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1221&quot; title=&quot;mongoc_cursor_is_alive() returns false for live cursor from find command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1221&quot;&gt;&lt;del&gt;CDRIVER-1221&lt;/del&gt;&lt;/a&gt; explains in &lt;a href=&quot;#comment-1261096&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;this comment&lt;/a&gt; that &lt;tt&gt;mongoc_cursor_is_alive&lt;/tt&gt; should return true until &lt;tt&gt;mongoc_cursor_next&lt;/tt&gt; returns NULL.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;http://mongoc.org/libmongoc/current/mongoc_cursor_is_alive.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;docs for mongoc_cursor_is_alive&lt;/a&gt; say&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Checks to see if a cursor is in a state that allows contacting a server to check for more documents. Note that even if false, there may be documents already retrieved that can be iterated using mongoc_cursor_next().&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The docs don&apos;t match the behavior. When the last batch is returned (with a cursor id of 0) we know we won&apos;t be contacting the server again, yet &lt;tt&gt;mongoc_cursor_is_alive&lt;/tt&gt; will continue to return true (shown in &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/r1.9/tests/test-mongoc-collection.c#L3534&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this test&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The current implementation is consistent with older behavior, so I don&apos;t think we should change it. However, we should update the documentation and consider deprecating it in favor of &lt;tt&gt;mongoc_cursor_more&lt;/tt&gt;, which should behave the same (the &lt;tt&gt;done&lt;/tt&gt; flag is set when the cursor id is 0 and there are no documents left in the last batch). As a sanity check, I replaced all calls of &lt;tt&gt;mongoc_cursor_is_alive&lt;/tt&gt; with &lt;tt&gt;mongoc_cursor_more&lt;/tt&gt; to verify tests passed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="522422">CDRIVER-2594</key>
            <summary>Update docs for cursor_is_alive and consider deprecating</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="kevin.albertson@mongodb.com">Kevin Albertson</assignee>
                                    <reporter username="kevin.albertson@mongodb.com">Kevin Albertson</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 Apr 2018 13:45:39 +0000</created>
                <updated>Sat, 28 Oct 2023 11:29:57 +0000</updated>
                            <resolved>Sun, 15 Apr 2018 03:51:56 +0000</resolved>
                                                    <fixVersion>1.10.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1868653" author="xgen-internal-githook" created="Thu, 19 Apr 2018 13:07:55 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;kevin.albertson@10gen.com&apos;, &apos;username&apos;: &apos;kevinAlbs&apos;, &apos;name&apos;: &apos;Kevin Albertson&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2594&quot; title=&quot;Update docs for cursor_is_alive and consider deprecating&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2594&quot;&gt;&lt;del&gt;CDRIVER-2594&lt;/del&gt;&lt;/a&gt; remove cursor_is_alive from tests&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/59dc452311db001ea6a742692a0be0b4614d428e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/59dc452311db001ea6a742692a0be0b4614d428e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1860747" author="xgen-internal-githook" created="Tue, 10 Apr 2018 20:18:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;kevin.albertson@10gen.com&apos;, &apos;name&apos;: &apos;Kevin Albertson&apos;, &apos;username&apos;: &apos;kevinAlbs&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2594&quot; title=&quot;Update docs for cursor_is_alive and consider deprecating&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2594&quot;&gt;&lt;del&gt;CDRIVER-2594&lt;/del&gt;&lt;/a&gt; deprecate cursor_is_alive&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/1a8a44e214d37b2ceabc3b0f773e5bdd79837664&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/1a8a44e214d37b2ceabc3b0f773e5bdd79837664&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="524899">CDRIVER-2604</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|htlo3r:</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>