<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:08:21 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-66] Tailable cursors not supported correctly</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-66</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;When the data currently in the cursor is exhausted, the mongo_cursor_next routine will call the &apos;private&apos; mongo_cursor_get_more routine to see if there is any additional data. If not, mongo_cursor_next returns 0.  At this point, the cursor never has a chance to get any more data (without a requery) because this code in mongo_cursor_next prevents another call to mongo_cursor_get_more.&lt;/p&gt;

&lt;p&gt;    /* no data */&lt;br/&gt;
    if (!cursor-&amp;gt;mm || cursor-&amp;gt;mm-&amp;gt;fields.num == 0)&lt;br/&gt;
        return 0;&lt;/p&gt;

&lt;p&gt;I found that if I make the mongo_cursor_get_more routine &apos;public&apos;, i.e., put it in mongo.h, and then add this code&lt;/p&gt;

&lt;p&gt;        if ( mongo_cursor_get_more( m_pCursor ) )&lt;br/&gt;
            bson_init( &amp;amp;m_pCursor-&amp;gt;current, &amp;amp;m_pCursor-&amp;gt;mm-&amp;gt;objs, 0 );&lt;/p&gt;

&lt;p&gt;prior to calling mongo_query_next, I get the desired results.  This seems like a pretty vulgar hack to me...&lt;/p&gt;

&lt;p&gt;If there was a way to tell that a cursor was &apos;tailable&apos; from the cursor structure, the above logic could be worked into the mongo_cursor_next routine.&lt;/p&gt;</description>
                <environment>Windows Server 2008 R2, Mongo v1.6.5 64 bit</environment>
        <key id="16288">CDRIVER-66</key>
            <summary>Tailable cursors not supported correctly</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="kbanker">Kyle Banker</assignee>
                                    <reporter username="slg1013">Steve Green</reporter>
                        <labels>
                            <label>query</label>
                    </labels>
                <created>Fri, 22 Apr 2011 22:02:41 +0000</created>
                <updated>Wed, 19 Oct 2016 14:14:48 +0000</updated>
                            <resolved>Mon, 11 Jul 2011 16:10:10 +0000</resolved>
                                    <version>0.3</version>
                                    <fixVersion>0.4</fixVersion>
                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="41622" author="auto" created="Mon, 11 Jul 2011 16:09:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;banker&apos;, u&apos;name&apos;: u&apos;Kyle Banker&apos;, u&apos;email&apos;: u&apos;kylebanker@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-66&quot; title=&quot;Tailable cursors not supported correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-66&quot;&gt;&lt;del&gt;CDRIVER-66&lt;/del&gt;&lt;/a&gt; fixed tailable cursors&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/ae504577885199417692f6a2082fd9c83a3f214f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/ae504577885199417692f6a2082fd9c83a3f214f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="41597" author="auto" created="Mon, 11 Jul 2011 13:26:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;banker&apos;, u&apos;name&apos;: u&apos;Kyle Banker&apos;, u&apos;email&apos;: u&apos;kylebanker@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-66&quot; title=&quot;Tailable cursors not supported correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-66&quot;&gt;&lt;del&gt;CDRIVER-66&lt;/del&gt;&lt;/a&gt; more tests and fixes for tailable.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/cb25f6e0c657bdc1c0dcbef2f209158e9225e7a5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/cb25f6e0c657bdc1c0dcbef2f209158e9225e7a5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="41363" author="auto" created="Fri, 8 Jul 2011 17:47:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;banker&apos;, u&apos;name&apos;: u&apos;Kyle Banker&apos;, u&apos;email&apos;: u&apos;kylebanker@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-66&quot; title=&quot;Tailable cursors not supported correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-66&quot;&gt;&lt;del&gt;CDRIVER-66&lt;/del&gt;&lt;/a&gt; initial fixes for tailable cursors&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/ee088910b8f1e0f2bcead48dca6c39b02914b902&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/ee088910b8f1e0f2bcead48dca6c39b02914b902&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="29907" author="kbanker" created="Wed, 27 Apr 2011 18:39:02 +0000"  >&lt;p&gt;Thanks for the patches. Will apply soon.&lt;/p&gt;

&lt;p&gt;Kyle&lt;/p&gt;</comment>
                            <comment id="29900" author="slg1013" created="Wed, 27 Apr 2011 18:28:33 +0000"  >&lt;p&gt;There was a bug in the previous version of mongo.c in the mongo_cursor_next routine.  This version of the file fixes that bug.&lt;/p&gt;</comment>
                            <comment id="29582" author="slg1013" created="Mon, 25 Apr 2011 17:32:04 +0000"  >&lt;p&gt;I&apos;ve made a patch to address this issue, although I&apos;m not sure that it is the most desirable way to solve the problem.  In short, I&apos;ve added an options field to the mongo_cursor struct that stores the options that were passed to mongo_find.  These flags are then used when determining the proper action in the mongo_cursor_next routine.  I&apos;ve attached new versions of mongo.h and mongo.c&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="11769" name="mongo.c" size="30820" author="slg1013" created="Wed, 27 Apr 2011 18:28:33 +0000"/>
                            <attachment id="11750" name="mongo.c" size="30808" author="slg1013" created="Mon, 25 Apr 2011 17:33:09 +0000"/>
                            <attachment id="11749" name="mongo.h" size="8530" author="slg1013" created="Mon, 25 Apr 2011 17:32:54 +0000"/>
                    </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|hrh6sn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>13900</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>