<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:11:25 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-1054] Support negative cursor limit for single-batch OP_QUERY and find command results</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-1054</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;Currently, there is no way for an extending driver to request single-batch result sets in a universal manner suitable for OP_QUERY and the find command. In the case of OP_QUERY, &lt;tt&gt;_mongoc_n_return()&lt;/tt&gt; has an assertion as of 1.3.0 that fails for negative limits. For the find command, there is no way to express &lt;tt&gt;singleBatch&lt;/tt&gt; without using a 3.2+ find command document (I may be overlooking some hacky solution to abuse how query modifiers are merged into the command document).&lt;/p&gt;

&lt;p&gt;Changing the private cursor struct to have a signed &lt;tt&gt;limit&lt;/tt&gt; would allow drivers extending libmongoc to pass a negative limit and request that the query return a single batch of results and leave no cursor open on the server. For legacy OP_QUERY operations, this negative limit would be passed as-is (the wire protocol already specifies a signed 32-bit integer for &lt;tt&gt;limit&lt;/tt&gt;). For the find command, a negative limit would be made positive and the &lt;tt&gt;singleBatch&lt;/tt&gt; command option set to &lt;tt&gt;true&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Changes would entail revising the assertion in &lt;tt&gt;_mongoc_n_return()&lt;/tt&gt; to operate on the absolute value of the limit, as well as changing the internal struct&apos;s field to a signed integer.&lt;/p&gt;

&lt;p&gt;Note: the related issue, &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1053&quot; title=&quot;Make cursor &amp;quot;limit&amp;quot; a signed int64_t&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1053&quot;&gt;CDRIVER-1053&lt;/a&gt;, refers to changing the public API of &lt;tt&gt;mongoc_collection_find()&lt;/tt&gt; to receive a signed limit.&lt;/p&gt;</description>
                <environment></environment>
        <key id="243897">CDRIVER-1054</key>
            <summary>Support negative cursor limit for single-batch OP_QUERY and find command results</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="jmikola@mongodb.com">Jeremy Mikola</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Dec 2015 22:58:26 +0000</created>
                <updated>Tue, 2 Feb 2016 02:01:26 +0000</updated>
                            <resolved>Wed, 27 Jan 2016 21:30:26 +0000</resolved>
                                    <version>1.3.0</version>
                                    <fixVersion>1.3.2</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1155868" author="xgen-internal-githook" created="Wed, 27 Jan 2016 21:29:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: Merge remote-tracking branch &apos;upstream/r1.3&apos;&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;upstream/r1.3:&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1054&quot; title=&quot;Support negative cursor limit for single-batch OP_QUERY and find command results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1054&quot;&gt;&lt;del&gt;CDRIVER-1054&lt;/del&gt;&lt;/a&gt;: Support negative cursor limit&lt;br/&gt;
  post-release bump&lt;br/&gt;
  1.3.1 Release&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1052&quot; title=&quot;CMakeLists.txt build is incomplete and makes the driver unusable for the C++ driver&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1052&quot;&gt;&lt;del&gt;CDRIVER-1052&lt;/del&gt;&lt;/a&gt;: update NEWS&lt;br/&gt;
  Fix &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1052&quot; title=&quot;CMakeLists.txt build is incomplete and makes the driver unusable for the C++ driver&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1052&quot;&gt;&lt;del&gt;CDRIVER-1052&lt;/del&gt;&lt;/a&gt;: CMakeLists.txt build is incomplete&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1031&quot; title=&quot;ReadConcern should be inherited from a parent when not set&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1031&quot;&gt;&lt;del&gt;CDRIVER-1031&lt;/del&gt;&lt;/a&gt; gridfs inherits client config&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/5f0720ed19cdeebf170e50fbef39f5f6d81de6db&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/5f0720ed19cdeebf170e50fbef39f5f6d81de6db&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1155867" author="xgen-internal-githook" created="Wed, 27 Jan 2016 21:29:16 +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@emptysquare.net&apos;}
&lt;p&gt;Message: Merge pull request #310 from jmikola/cdriver-1054&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1054&quot; title=&quot;Support negative cursor limit for single-batch OP_QUERY and find command results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1054&quot;&gt;&lt;del&gt;CDRIVER-1054&lt;/del&gt;&lt;/a&gt;: Support negative cursor limit&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/d42ef14854895f02054d95a25fe7e12dfdb327d8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/d42ef14854895f02054d95a25fe7e12dfdb327d8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1155865" author="xgen-internal-githook" created="Wed, 27 Jan 2016 21:29:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jmikola&apos;, u&apos;name&apos;: u&apos;Jeremy Mikola&apos;, u&apos;email&apos;: u&apos;jmikola@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1054&quot; title=&quot;Support negative cursor limit for single-batch OP_QUERY and find command results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1054&quot;&gt;&lt;del&gt;CDRIVER-1054&lt;/del&gt;&lt;/a&gt;: Support negative cursor limit&lt;/p&gt;

&lt;p&gt;This adds internal support for specifying a negative cursor limit (i.e. single-batch mode) for both OP_QUERY and find command code paths. Note that this does not change the public API, which will be handled for 2.0 by &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1053&quot; title=&quot;Make cursor &amp;quot;limit&amp;quot; a signed int64_t&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1053&quot;&gt;CDRIVER-1053&lt;/a&gt;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/f8802e35c6dbabc5bf40620c9402f21f7d65ed5b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/f8802e35c6dbabc5bf40620c9402f21f7d65ed5b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1154789" author="jesse" created="Wed, 27 Jan 2016 02:06:36 +0000"  >&lt;p&gt;Let&apos;s not close this until it&apos;s merged to master too.&lt;/p&gt;</comment>
                            <comment id="1154788" author="xgen-internal-githook" created="Wed, 27 Jan 2016 02:05:14 +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@emptysquare.net&apos;}
&lt;p&gt;Message: Merge pull request #310 from jmikola/cdriver-1054&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1054&quot; title=&quot;Support negative cursor limit for single-batch OP_QUERY and find command results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1054&quot;&gt;&lt;del&gt;CDRIVER-1054&lt;/del&gt;&lt;/a&gt;: Support negative cursor limit&lt;br/&gt;
Branch: r1.3&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/d42ef14854895f02054d95a25fe7e12dfdb327d8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/d42ef14854895f02054d95a25fe7e12dfdb327d8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1154786" author="xgen-internal-githook" created="Wed, 27 Jan 2016 02:05:11 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jmikola&apos;, u&apos;name&apos;: u&apos;Jeremy Mikola&apos;, u&apos;email&apos;: u&apos;jmikola@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1054&quot; title=&quot;Support negative cursor limit for single-batch OP_QUERY and find command results&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1054&quot;&gt;&lt;del&gt;CDRIVER-1054&lt;/del&gt;&lt;/a&gt;: Support negative cursor limit&lt;/p&gt;

&lt;p&gt;This adds internal support for specifying a negative cursor limit (i.e. single-batch mode) for both OP_QUERY and find command code paths. Note that this does not change the public API, which will be handled for 2.0 by &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1053&quot; title=&quot;Make cursor &amp;quot;limit&amp;quot; a signed int64_t&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1053&quot;&gt;CDRIVER-1053&lt;/a&gt;.&lt;br/&gt;
Branch: r1.3&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/f8802e35c6dbabc5bf40620c9402f21f7d65ed5b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/f8802e35c6dbabc5bf40620c9402f21f7d65ed5b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1154447" author="jmikola@gmail.com" created="Tue, 26 Jan 2016 21:15:52 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/pull/310&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/pull/310&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="243898">PHPC-515</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="243730">CDRIVER-1053</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|hsezlb:</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>