<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:34 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-559] Result of find is not correct (Using Limit)</title>
                <link>https://jira.mongodb.org/browse/JAVA-559</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt; I use the MongoDB and develop by java enviroment. and Using find mehtod with skip and limit, result of find is not correct.&lt;br/&gt;
For example find(query).skip(0).limit(1000) --&amp;gt; This query result is not correct, but if i set the limit value 100 or 300, the result is correct.&lt;br/&gt;
  Query is very simple but use the array index.&lt;/p&gt;

&lt;p&gt;  What is the problem ? Please Solve this..&lt;/p&gt;


</description>
                <environment>MongoDB 2.0.4 ( CentOS 5.3 ) --&amp;gt; Sharding : 3 datanode , 3 mongos, 3mongod conf &lt;br/&gt;
Java Driver 2.7.2</environment>
        <key id="37032">JAVA-559</key>
            <summary>Result of find is not correct (Using Limit)</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="5">Cannot Reproduce</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="sokoban">HyungGi Kim</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Tue, 24 Apr 2012 02:12:45 +0000</created>
                <updated>Tue, 25 Jun 2013 15:29:12 +0000</updated>
                            <resolved>Tue, 25 Jun 2013 15:29:12 +0000</resolved>
                                    <version>2.7.2</version>
                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="367337" author="jeff.yemin" created="Tue, 25 Jun 2013 15:29:12 +0000"  >&lt;p&gt;Please re-open if you have additional information&lt;/p&gt;</comment>
                            <comment id="152586" author="jeff.yemin" created="Sun, 12 Aug 2012 03:46:20 +0000"  >&lt;p&gt;Sorry we lost track of this.  Can you try to reproduce this with server version 2.0.7?  This looks similar to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4680&quot; title=&quot;Inconsistent query results on large data and result sets&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4680&quot;&gt;&lt;del&gt;SERVER-4680&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="112988" author="sokoban" created="Tue, 24 Apr 2012 05:46:10 +0000"  >
&lt;p&gt;Full query is very simple&lt;/p&gt;

&lt;p&gt;query is &lt;br/&gt;
 db.data.find({&quot;$and&quot; : [ { &quot;indexcol&quot; : { &quot;$all&quot; : &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;string&amp;quot;&amp;#93;&lt;/span&gt;}}]}).skip(0).limit(500);&lt;/p&gt;

&lt;p&gt;Total Count is 912 but result of limit is 433&lt;/p&gt;

&lt;p&gt;Shard Key is UNIX TimeStamp&lt;/p&gt;

&lt;p&gt;query explain&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
        &quot;clusteredType&quot; : &quot;ParallelSort&quot;,&lt;br/&gt;
        &quot;shards&quot; : {&lt;br/&gt;
                &quot;server01:100&quot; : [&lt;br/&gt;
                        {&lt;br/&gt;
                                &quot;cursor&quot; : &quot;BtreeCursor indexcol_1&quot;,&lt;br/&gt;
                                &quot;nscanned&quot; : 108,&lt;br/&gt;
                                &quot;nscannedObjects&quot; : 108,&lt;br/&gt;
                                &quot;n&quot; : 108,&lt;br/&gt;
                                &quot;millis&quot; : 8,&lt;br/&gt;
                                &quot;nYields&quot; : 0,&lt;br/&gt;
                                &quot;nChunkSkips&quot; : 0,&lt;br/&gt;
                                &quot;isMultiKey&quot; : true,&lt;br/&gt;
                                &quot;indexOnly&quot; : false,&lt;br/&gt;
                                &quot;indexBounds&quot; : &lt;/p&gt;
{
                                        &quot;indexcol&quot; : [
                                                [
                                                        &quot;string&quot;,
                                                        &quot;string&quot;
                                                ]
                                        ]
                                }
&lt;p&gt;                        }&lt;br/&gt;
                ],&lt;br/&gt;
                &quot;server02:101&quot; : [&lt;br/&gt;
                        {&lt;br/&gt;
                                &quot;cursor&quot; : &quot;BtreeCursor indexcol_1&quot;,&lt;br/&gt;
                                &quot;nscanned&quot; : 185,&lt;br/&gt;
                                &quot;nscannedObjects&quot; : 185,&lt;br/&gt;
                                &quot;n&quot; : 185,&lt;br/&gt;
                                &quot;millis&quot; : 13,&lt;br/&gt;
                                &quot;nYields&quot; : 0,&lt;br/&gt;
                                &quot;nChunkSkips&quot; : 0,&lt;br/&gt;
                                &quot;isMultiKey&quot; : true,&lt;br/&gt;
                                &quot;indexOnly&quot; : false,&lt;br/&gt;
                                &quot;indexBounds&quot; : &lt;/p&gt;
{
                                        &quot;indexcol&quot; : [
                                                [
                                                        &quot;string&quot;,
                                                        &quot;string&quot;
                                                ]
                                        ]
                                }
&lt;p&gt;                        }&lt;br/&gt;
                ],&lt;br/&gt;
                &quot;server03:102&quot; : [&lt;br/&gt;
                        {&lt;br/&gt;
                                &quot;cursor&quot; : &quot;BtreeCursor indexcol_1&quot;,&lt;br/&gt;
                                &quot;nscanned&quot; : 500,&lt;br/&gt;
                                &quot;nscannedObjects&quot; : 500,&lt;br/&gt;
                                &quot;n&quot; : 500,&lt;br/&gt;
                                &quot;millis&quot; : 38,&lt;br/&gt;
                                &quot;nYields&quot; : 2,&lt;br/&gt;
                                &quot;nChunkSkips&quot; : 0,&lt;br/&gt;
                                &quot;isMultiKey&quot; : true,&lt;br/&gt;
                                &quot;indexOnly&quot; : false,&lt;br/&gt;
                                &quot;indexBounds&quot; : &lt;/p&gt;
{
                                        &quot;indexcol&quot; : [
                                                [
                                                        &quot;string&quot;,
                                                        &quot;string&quot;
                                                ]
                                        ]
                                }
&lt;p&gt;                        }&lt;br/&gt;
                ]&lt;br/&gt;
        },&lt;br/&gt;
        &quot;n&quot; : 793,&lt;br/&gt;
        &quot;nChunkSkips&quot; : 0,&lt;br/&gt;
        &quot;nYields&quot; : 2,&lt;br/&gt;
        &quot;nscanned&quot; : 793,&lt;br/&gt;
        &quot;nscannedObjects&quot; : 793,&lt;br/&gt;
        &quot;millisTotal&quot; : 59,&lt;br/&gt;
        &quot;millisAvg&quot; : 19,&lt;br/&gt;
        &quot;numQueries&quot; : 3,&lt;br/&gt;
        &quot;numShards&quot; : 3&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;</comment>
                            <comment id="112942" author="scotthernandez" created="Tue, 24 Apr 2012 02:40:33 +0000"  >&lt;p&gt;Can you issue the same query + explain from the mongo javascript shell? Please include the full query + results.&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|hrhb5b:</customfieldvalue>

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