<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:59:45 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-22216] Failed when using $exist false check on a  embedded array </title>
                <link>https://jira.mongodb.org/browse/SERVER-22216</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Two documents, (one has the array sub-doc: app.qos, the other doesn&apos;t have the array doc. could get the document which does has the array sub-document by query with &lt;/p&gt;
{app.qos: $exist false}
&lt;p&gt;.&lt;br/&gt;
{&lt;br/&gt;
        &quot;_id&quot; : &quot;af16688e-b73c-480e-bfdb-1eef3de9453b&quot;,&lt;br/&gt;
        &quot;str_id&quot; : &quot;ad071684-d713-4979-8064-bd4c4efea945&quot;,&lt;br/&gt;
        &quot;app&quot; : {&lt;br/&gt;
                &quot;end_time&quot; : ISODate(&quot;2016-01-15T17:33:26.842Z&quot;),&lt;br/&gt;
                &quot;qos&quot; : [&lt;/p&gt;
                        {
                                &quot;jitter&quot; : 0,
                                &quot;loc_time_stamp&quot; : NumberLong(&quot;3839365094&quot;),
                                &quot;loc_tx_pkts&quot; : 2,
                                &quot;loc_tx_oct&quot; : 160,
                        }
&lt;p&gt;                ]&lt;br/&gt;
        }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
        &quot;_id&quot; : &quot;af16688e-b73c-480e-bfdb-1eef3de9453b&quot;,&lt;br/&gt;
        &quot;str_id&quot; : &quot;ad071684-d713-4979-8064-bd4c4efea945&quot;,&lt;br/&gt;
        &quot;app&quot; : &lt;/p&gt;
{
                &quot;end_time&quot; : ISODate(&quot;2016-01-15T17:33:26.842Z&quot;),
         }
&lt;p&gt;}&lt;/p&gt;</description>
                <environment>1) CentOS 7&lt;br/&gt;
2) Mongo DB version: 3.0.5 + wiredTiger&lt;br/&gt;
3) C++ driver: legacy 1.0.1</environment>
        <key id="259159">SERVER-22216</key>
            <summary>Failed when using $exist false check on a  embedded array </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="-1">Unassigned</assignee>
                                    <reporter username="gabriel.wang">gabriel.wang</reporter>
                        <labels>
                            <label>legacy-cxx</label>
                    </labels>
                <created>Mon, 18 Jan 2016 15:37:24 +0000</created>
                <updated>Thu, 14 Apr 2016 15:17:44 +0000</updated>
                            <resolved>Mon, 18 Jan 2016 23:15:43 +0000</resolved>
                                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1146699" author="stennie" created="Mon, 18 Jan 2016 23:15:43 +0000"  >&lt;p&gt;Hi Gabriel,&lt;/p&gt;

&lt;p&gt;Thanks for confirming this issue was due to incorrect query syntax.&lt;/p&gt;

&lt;p&gt;Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the &lt;a href=&quot;http://groups.google.com/group/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-user group&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com/questions/tagged/mongodb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Stack Overflow with the &lt;tt&gt;mongodb&lt;/tt&gt; tag&lt;/a&gt; where your questions will reach a large audience of MongoDB users, developers and enthusiasts.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Stephen&lt;/p&gt;</comment>
                            <comment id="1146562" author="gabriel.wang" created="Mon, 18 Jan 2016 18:06:08 +0000"  >&lt;p&gt;sorry for my typo.  &lt;br/&gt;
The syntax of query is incorrect.  it should be { app.qos: {$exists:false}. &lt;br/&gt;
I have resolved it, please close this ticket.&lt;/p&gt;</comment>
                            <comment id="1146466" author="gabriel.wang" created="Mon, 18 Jan 2016 15:46:06 +0000"  >&lt;p&gt;The log captured in mongod.log as below.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;conn2&amp;#93;&lt;/span&gt; command xxx.$cmd command: count { count: &quot;app&quot;, query: { app.qos: &quot;{$exists:false}&quot; } } planSummary: COLLSCAN   keyUpdates:0 writeConflicts:0 numYields:459 reslen:44 locks:{ Global: { acquireCount: &lt;/p&gt;
{ r: 920 }
&lt;p&gt; }, Database: { acquireCount: &lt;/p&gt;
{ r: 460 }
&lt;p&gt; }, Collection: {acquireCount: &lt;/p&gt;
{ r: 460 }
&lt;p&gt; } } 1923ms&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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 18 Jan 2016 23:15:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 4 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 4 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>gabriel.wang</customfieldvalue>
            <customfieldvalue>stephen.steneker@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkkfb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hshh2f:</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>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1) Create documents&lt;/p&gt;

&lt;p&gt;2) Create query object, and return the number of documents which doesn&apos;t have the field: app.qos&lt;/p&gt;

&lt;p&gt;BSONObj query = BSON(&quot;app.qos&quot;&amp;lt;&amp;lt;&quot;{$exists:false}&quot;);&lt;br/&gt;
Query qos_query(query);&lt;br/&gt;
int counter  = conn-&amp;gt;count(ns, qos_query);&lt;/p&gt;

&lt;p&gt;3) Check the result of count.   the counter=0 (It should return 1) &lt;/p&gt;

&lt;p&gt;4) If run the shell command from command line, it return correctly.&lt;br/&gt;
    db.xxx.find( {&quot;app.qos&quot;: { $exists: false}}).count()&lt;/p&gt;
</customfieldvalue>

                        </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|hsfb73:</customfieldvalue>

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