<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:12: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>[CDRIVER-1530] Tailable cursor only works with MONGOC_QUERY_AWAIT_DATA</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-1530</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;Tailable cursors without the &lt;tt&gt;MONGOC_QUERY_AWAIT_DATA&lt;/tt&gt; flag seem to close out when connected to a MongoDB 3.2. This behavior is not observed when connected to 3.0 or earlier MongoDB. It is not clear if earlier versions of the driver are affected also.&lt;/p&gt;

&lt;p&gt;Attempting to read a tailable cursor repeatedly without the above flag generates the error &quot;Cannot advance a completed or failed cursor.&quot;&lt;/p&gt;

&lt;p&gt;The documentation for tailable cursors shows the first example without this flag so it seems like it&apos;s an acceptable thing to do:&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/find_getmore_killcursors_commands.rst#tailable-cursors&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/find_getmore_killcursors_commands.rst#tailable-cursors&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking through the code for the C Driver though it appears that merely having no payload in &lt;tt&gt;getMore&lt;/tt&gt; results will cause the cursor to be marked as &quot;done&quot;. Reading from such a marked cursor triggers an error on the next &lt;tt&gt;getMore&lt;/tt&gt; attempt (the same error as mentioned above). This seems to be the wrong behavior, but I&apos;m not sure.&lt;/p&gt;

&lt;p&gt;See attached code, which is a slight modification of the Github example for using tailable cursors in the C driver.&lt;/p&gt;</description>
                <environment></environment>
        <key id="314858">CDRIVER-1530</key>
            <summary>Tailable cursor only works with MONGOC_QUERY_AWAIT_DATA</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="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="andrew.ryder@mongodb.com">Andrew Ryder</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Sep 2016 07:48:10 +0000</created>
                <updated>Wed, 21 Sep 2016 00:03:57 +0000</updated>
                            <resolved>Mon, 12 Sep 2016 18:06:00 +0000</resolved>
                                    <version>1.4.0</version>
                                    <fixVersion>1.4.1</fixVersion>
                    <fixVersion>1.5.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="1382262" author="xgen-internal-githook" created="Mon, 12 Sep 2016 18:05:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1530&quot; title=&quot;Tailable cursor only works with MONGOC_QUERY_AWAIT_DATA&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1530&quot;&gt;&lt;del&gt;CDRIVER-1530&lt;/del&gt;&lt;/a&gt; mention ticket number in test code&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/08e5cf4acaa694e682a7c9979657532435d722c3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/08e5cf4acaa694e682a7c9979657532435d722c3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1382260" author="xgen-internal-githook" created="Mon, 12 Sep 2016 18:05:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1530&quot; title=&quot;Tailable cursor only works with MONGOC_QUERY_AWAIT_DATA&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1530&quot;&gt;&lt;del&gt;CDRIVER-1530&lt;/del&gt;&lt;/a&gt; mention ticket number in test code&lt;br/&gt;
Branch: r1.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/053367df0bf0d856bde2dd7ea84655da5b8ca0b7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/053367df0bf0d856bde2dd7ea84655da5b8ca0b7&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1382259" author="xgen-internal-githook" created="Mon, 12 Sep 2016 18:05:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1530&quot; title=&quot;Tailable cursor only works with MONGOC_QUERY_AWAIT_DATA&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1530&quot;&gt;&lt;del&gt;CDRIVER-1530&lt;/del&gt;&lt;/a&gt; test tailable mongoc_cursor_more&lt;br/&gt;
Branch: r1.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/beeb029ff31e176ff0e2617d19a06640cb6573b4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/beeb029ff31e176ff0e2617d19a06640cb6573b4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1382258" author="xgen-internal-githook" created="Mon, 12 Sep 2016 18:05:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1530&quot; title=&quot;Tailable cursor only works with MONGOC_QUERY_AWAIT_DATA&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1530&quot;&gt;&lt;del&gt;CDRIVER-1530&lt;/del&gt;&lt;/a&gt; fix cursor_next and tailable find cmd&lt;br/&gt;
Branch: r1.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/d117efb44de073099b03c35c94990dbbb9a97dbc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/d117efb44de073099b03c35c94990dbbb9a97dbc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1382243" author="xgen-internal-githook" created="Mon, 12 Sep 2016 17:58:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1530&quot; title=&quot;Tailable cursor only works with MONGOC_QUERY_AWAIT_DATA&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1530&quot;&gt;&lt;del&gt;CDRIVER-1530&lt;/del&gt;&lt;/a&gt; test tailable mongoc_cursor_more&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/7d0b38206efb4c46bf344a265a2f1bf70c703473&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/7d0b38206efb4c46bf344a265a2f1bf70c703473&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1382242" author="xgen-internal-githook" created="Mon, 12 Sep 2016 17:58:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1530&quot; title=&quot;Tailable cursor only works with MONGOC_QUERY_AWAIT_DATA&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1530&quot;&gt;&lt;del&gt;CDRIVER-1530&lt;/del&gt;&lt;/a&gt; fix cursor_next and tailable find cmd&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/14b72bfe0f299d783d59ea0bb6cca15bebe84b2d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/14b72bfe0f299d783d59ea0bb6cca15bebe84b2d&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="267306">PHPC-586</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="137895" name="mongoc-tail.c" size="2518" author="andrew.ryder@mongodb.com" created="Thu, 8 Sep 2016 07:48:10 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000V8ELTIA3]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <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|hspjkv:</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>