<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:02:46 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>[SERVER-3330] Sporadically missing data from a query</title>
                <link>https://jira.mongodb.org/browse/SERVER-3330</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The behavior we are seeing &lt;br/&gt;
is that when we run a query, it will most of the time return a set of &lt;br/&gt;
results that make sense, and then once out of 1000 queries, it will be &lt;br/&gt;
missing a single record.  I&apos;ve tried sorting the results to see if &lt;br/&gt;
it&apos;s always the same time, using a snapshot query, setting the Java &lt;br/&gt;
client batch size to Integer.MAX_VALUE, and using the toArray() method &lt;br/&gt;
on the Java client DBCursor object to get it to quickly pull the &lt;br/&gt;
data.  I&apos;ve also removed any indexes that the queries might be using, &lt;br/&gt;
so it doesn&apos;t appear to be an issue with indexes. We are only querying &lt;br/&gt;
the master, though we saw this when querying slaves as well, though &lt;br/&gt;
the data missing was very old and it wouldn&apos;t have been a replication &lt;br/&gt;
issue. &lt;br/&gt;
I am only able to reproduce this issue on our production servers &lt;br/&gt;
(running Linux), and even with copying all of the files locally, I &lt;br/&gt;
have been unable to reproduce this issue on my local machine (using &lt;br/&gt;
replicates on Mac and Windows).  All versions of the DB are 1.8.1. &lt;/p&gt;

&lt;p&gt;I can reproduce the issue in the shell as well, though not as easily.&lt;/p&gt;

&lt;p&gt;I turned on profiling logs and here &lt;br/&gt;
is the output for the 3 queries (full with 523 results, missing with &lt;br/&gt;
522 results, full again with 523 results): &lt;/p&gt;

&lt;p&gt;{ &quot;ts&quot; : ISODate(&quot;2011-06-24T02:31:23.438Z&quot;), &quot;info&quot; : &quot;query &lt;br/&gt;
pacman.packages ntoreturn:2147483647 reslen:619920 nscanned:7110 &lt;br/&gt;
\nquery: { query: { cluster: \&quot;c1\&quot;, installableToEnvironment: &lt;/p&gt;
{ $in: 
[ \&quot;UAT\&quot;, \&quot;STAGING\&quot;, \&quot;PRODUCTION\&quot; ] }
&lt;p&gt;, deployments: { $elemMatch: &lt;br/&gt;
{ environmentType: \&quot;STAGING\&quot;, $or: [ &lt;/p&gt;
{ uninstallDate: null }
&lt;p&gt;, &lt;br/&gt;
{ uninstallDate: &lt;/p&gt;
{ $gte: new Date(1308277883424) }
&lt;p&gt; } ] } } }, orderby: &lt;/p&gt;
{ _id: 1 }
&lt;p&gt; }  nreturned:523 bytes:619904&quot;, &quot;millis&quot; : 17 } &lt;/p&gt;

&lt;p&gt;{ &quot;ts&quot; : ISODate(&quot;2011-06-24T02:31:23.924Z&quot;), &quot;info&quot; : &quot;query &lt;br/&gt;
pacman.packages ntoreturn:2147483647 reslen:618733 nscanned:7110 &lt;br/&gt;
\nquery: { query: { cluster: \&quot;c1\&quot;, installableToEnvironment: &lt;/p&gt;
{ $in: 
[ \&quot;UAT\&quot;, \&quot;STAGING\&quot;, \&quot;PRODUCTION\&quot; ] }
&lt;p&gt;, deployments: { $elemMatch: &lt;br/&gt;
{ environmentType: \&quot;STAGING\&quot;, $or: [ &lt;/p&gt;
{ uninstallDate: null }
&lt;p&gt;, &lt;br/&gt;
{ uninstallDate: &lt;/p&gt;
{ $gte: new Date(1308277883909) }
&lt;p&gt; } ] } } }, orderby: &lt;/p&gt;
{ _id: 1 }
&lt;p&gt; }  nreturned:522 bytes:618717&quot;, &quot;millis&quot; : 19 } &lt;/p&gt;

&lt;p&gt;{ &quot;ts&quot; : ISODate(&quot;2011-06-24T02:31:24.354Z&quot;), &quot;info&quot; : &quot;query &lt;br/&gt;
pacman.packages ntoreturn:2147483647 reslen:619920 nscanned:7110 &lt;br/&gt;
\nquery: { query: { cluster: \&quot;c1\&quot;, installableToEnvironment: &lt;/p&gt;
{ $in: 
[ \&quot;UAT\&quot;, \&quot;STAGING\&quot;, \&quot;PRODUCTION\&quot; ] }
&lt;p&gt;, deployments: { $elemMatch: &lt;br/&gt;
{ environmentType: \&quot;STAGING\&quot;, $or: [ &lt;/p&gt;
{ uninstallDate: null }
&lt;p&gt;, &lt;br/&gt;
{ uninstallDate: &lt;/p&gt;
{ $gte: new Date(1308277884338) }
&lt;p&gt; } ] } } }, orderby: &lt;/p&gt;
{ _id: 1 }
&lt;p&gt; }  nreturned:523 bytes:619904&quot;, &quot;millis&quot; : 19 } &lt;/p&gt;</description>
                <environment>Driver: Java 2.6.3 &lt;br/&gt;
&lt;br/&gt;
CentOS release 5.6 &lt;br/&gt;
(Final), running 2.6.22.19-vs2.3.0.34.1 x86_64.  The server is a VM &lt;br/&gt;
running on the same physical hardware (though a different VM) as the &lt;br/&gt;
web application querying the DB.  File system where the data is stored &lt;br/&gt;
is ufs with plenty of free space. Total system memory is 32GB, mostly &lt;br/&gt;
used by mongo with 1.5GB free. </environment>
        <key id="18686">SERVER-3330</key>
            <summary>Sporadically missing data from a query</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="aaron">Aaron Staple</assignee>
                                    <reporter username="mnorman">Michael D. Norman</reporter>
                        <labels>
                    </labels>
                <created>Fri, 24 Jun 2011 16:34:38 +0000</created>
                <updated>Mon, 29 Aug 2011 15:56:45 +0000</updated>
                            <resolved>Mon, 27 Jun 2011 17:08:36 +0000</resolved>
                                    <version>1.8.1</version>
                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="39325" author="mnorman" created="Mon, 27 Jun 2011 14:07:12 +0000"  >&lt;p&gt;I was finally able to reproduce the issue locally and I have found the root cause: we were updating the data for an item in an array by removing the item and inserting a new one in its place.  Because that cannot be done atomically, queries were coming into the middle of this operation. In all of my repro scenarios, I was never touching the code that did these updates because they were supposedly rarer than they are.&lt;/p&gt;</comment>
                            <comment id="39279" author="mnorman" created="Sun, 26 Jun 2011 19:10:19 +0000"  >&lt;p&gt;I have been doing more testing, and I&apos;m unable to reproduce this on the same server with a new mongo instance.  Therefore, I think the hardware is not necessarily the culprit, and I have a feeling that I just can&apos;t reproduce the results while generating similar writes and reads.  It appears that the data changes in production are causing the issue, but the root cause is still unknown, especially since a snapshot query is supposed to fix this type of issue.&lt;/p&gt;</comment>
                            <comment id="39090" author="mnorman" created="Fri, 24 Jun 2011 16:35:13 +0000"  >&lt;p&gt;I started this as a thread at &lt;a href=&quot;http://groups.google.com/group/mongodb-user/browse_thread/thread/bd2d02f9f2129365#&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/mongodb-user/browse_thread/thread/bd2d02f9f2129365#&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 34 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 34 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>aaron</customfieldvalue>
            <customfieldvalue>mnorman</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrowyf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrirqf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>23146</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht0ejj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>