<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:53 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>[JAVA-1140] DBCursor.hasNext malfunctioned with complex query and batchSize specified</title>
                <link>https://jira.mongodb.org/browse/JAVA-1140</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;when we issue a complex query with batchSize (50)&lt;br/&gt;
the result should be return 200 records, &lt;br/&gt;
and DBCursor.size() return the same&lt;/p&gt;

&lt;p&gt;but, while loop break after 50 times loop&lt;br/&gt;
while(cursor.hasNext()) {   &lt;br/&gt;
   cursor.next();&lt;br/&gt;
   // do something...  &lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;if we leave batchSize unspecfied, then cursor.hasNext() works fine&lt;/p&gt;

&lt;p&gt;is this a bug or limitation ?&lt;/p&gt;

&lt;p&gt;complex query: &lt;br/&gt;
{ &quot;$and&quot; : [ &lt;/p&gt;
{ &quot;Level&quot; : 8}
&lt;p&gt; , &lt;/p&gt;
{ &quot;Visible&quot; : true}
&lt;p&gt; , { &quot;Status&quot; : { &quot;$ne&quot; : &quot;DELETED&quot;}} , &lt;/p&gt;
{ &quot;VersionId&quot; : -1}
&lt;p&gt; , { &quot;PositionIds&quot; : { &quot;$in&quot; : [ 12]}}]}&lt;/p&gt;</description>
                <environment>server version: 2.4.3</environment>
        <key id="118686">JAVA-1140</key>
            <summary>DBCursor.hasNext malfunctioned with complex query and batchSize specified</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="johndoe2014">John Doe</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Fri, 7 Mar 2014 13:18:38 +0000</created>
                <updated>Wed, 11 Sep 2019 19:12:00 +0000</updated>
                            <resolved>Sat, 8 Mar 2014 14:26:02 +0000</resolved>
                                    <version>2.11.1</version>
                                                    <component>API</component>
                    <component>Query Operations</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="513947" author="xgen-internal-githook" created="Wed, 12 Mar 2014 03:39:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1140&quot; title=&quot;DBCursor.hasNext malfunctioned with complex query and batchSize specified&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1140&quot;&gt;&lt;del&gt;JAVA-1140&lt;/del&gt;&lt;/a&gt;: Temporarily disabling an ordered bulk write test for reporting of both write errors and write concern errors&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/a4ea6e46950dba26f5e5923d236aa4d32c4ca3f3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/a4ea6e46950dba26f5e5923d236aa4d32c4ca3f3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="513884" author="xgen-internal-githook" created="Wed, 12 Mar 2014 01:04:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1140&quot; title=&quot;DBCursor.hasNext malfunctioned with complex query and batchSize specified&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1140&quot;&gt;&lt;del&gt;JAVA-1140&lt;/del&gt;&lt;/a&gt;: Implemented BulkWriteError.toString&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/efdb9dda10cb24c180b2e9a079c02059f07b3f3f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/efdb9dda10cb24c180b2e9a079c02059f07b3f3f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="512021" author="jeff.yemin" created="Sat, 8 Mar 2014 14:26:02 +0000"  >&lt;p&gt;Hi John,&lt;/p&gt;

&lt;p&gt;Thanks for doing the additional research to figure out the root cause.  I&apos;m going to close this issue since there&apos;s nothing we can do in the JAVA driver to address it.&lt;/p&gt;</comment>
                            <comment id="512001" author="johndoe2014" created="Sat, 8 Mar 2014 05:33:07 +0000"  >&lt;p&gt;seems the problem cause by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-7267&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-7267&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|hrwkt3:</customfieldvalue>

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