<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:23:51 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-10709] Invalid BSON docs lead to errors in complex queries</title>
                <link>https://jira.mongodb.org/browse/SERVER-10709</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I believe there are few documents stored in my db which are not BSON valid or cause issue when retured, since when they are included into the result set of $and $or $geonear queries they made it error. I have identified one record which is definitely causing this problem. The only thing I can see is when I print it on the shell it indents wrongly and misses some key, but when it is exported it is a valid JSON and the dump also looks a correct binary.&lt;/p&gt;

&lt;p&gt;db.runCommand( { &quot;geoNear&quot;: &apos;users5&apos;, &quot;near&quot;: &lt;/p&gt;
{ &quot;type&quot;: &quot;Point&quot;, &quot;coordinates&quot;: [ 0, 0 ] }
&lt;p&gt;, &quot;spherical&quot;: true, num: 1 } )&lt;br/&gt;
{&lt;br/&gt;
	&quot;ns&quot; : &quot;your_db.users5&quot;,&lt;br/&gt;
	&quot;results&quot; : [ ],&lt;br/&gt;
	&quot;errmsg&quot; : &quot;exception: wrong type for field () 10 != 2&quot;,&lt;br/&gt;
	&quot;code&quot; : 13111,&lt;br/&gt;
	&quot;ok&quot; : 0&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Further details on &lt;a href=&quot;http://pastie.org/8308587&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://pastie.org/8308587&lt;/a&gt;&lt;/p&gt;
</description>
                <environment>linux ubuntu 12.10</environment>
        <key id="88973">SERVER-10709</key>
            <summary>Invalid BSON docs lead to errors in complex queries</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="3">Duplicate</resolution>
                                        <assignee username="stephen.steneker@mongodb.com">Stennie Steneker</assignee>
                                    <reporter username="fmoscon">Fabrizio Moscon</reporter>
                        <labels>
                            <label>bson</label>
                            <label>query</label>
                    </labels>
                <created>Sun, 8 Sep 2013 16:38:16 +0000</created>
                <updated>Wed, 10 Dec 2014 23:07:05 +0000</updated>
                            <resolved>Mon, 9 Sep 2013 00:45:01 +0000</resolved>
                                    <version>2.4.5</version>
                    <version>2.4.6</version>
                                                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="420583" author="stennie" created="Mon, 9 Sep 2013 00:45:01 +0000"  >&lt;p&gt;Hi Fabrizio,&lt;/p&gt;

&lt;p&gt;The issue is that &lt;tt&gt;2dsphere&lt;/tt&gt; indexes in 2.4.6 do not honour the &lt;tt&gt;sparse&lt;/tt&gt; option and are not sparse by default.  See &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9639&quot; title=&quot;2dsphere indexes with {2dsphereIndexVersion:2} should be sparse on geo fields&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9639&quot;&gt;&lt;del&gt;SERVER-9639&lt;/del&gt;&lt;/a&gt;, which has been fixed in the 2.5 development branch.  The BSON error is that the &lt;tt&gt;$geonear&lt;/tt&gt; command is expecting a string (type 2) and instead finding a null (type 10): &lt;a href=&quot;http://bsonspec.org/#/specification&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://bsonspec.org/#/specification&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I tested your sample data with MongoDB 2.5.2 (unstable/development release) and the &lt;tt&gt;$geoNear&lt;/tt&gt; works as expected (note: you do not have to specify sparse).&lt;/p&gt;

&lt;p&gt;I&apos;m resolving this as a duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9639&quot; title=&quot;2dsphere indexes with {2dsphereIndexVersion:2} should be sparse on geo fields&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9639&quot;&gt;&lt;del&gt;SERVER-9639&lt;/del&gt;&lt;/a&gt;.  This fix is currently not tagged for a backport to 2.4 but I&apos;ve asked for a review if backport is possible.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Stephen&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="74833">SERVER-9639</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="30860" name="users5.bson" size="56733" author="fmoscon" created="Sun, 8 Sep 2013 16:38:16 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 9 Sep 2013 00:45:01 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 23 weeks, 3 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>
                            10 years, 23 weeks, 3 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="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>fmoscon</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|hrmhgv:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>81622</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;load this dump: &lt;a href=&quot;http://privatepaste.com/download/576b7e1184&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://privatepaste.com/download/576b7e1184&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;run the index: db.users5.ensureIndex( &lt;/p&gt;
{ &quot;_id&quot;: 1, &quot;times.current_location&quot;: 1, &quot;places.current.geolocation&quot; : &quot;2dsphere&quot;}
&lt;p&gt;, &lt;/p&gt;
{ &quot;sparse&quot;: true }
&lt;p&gt; );&lt;/p&gt;

&lt;p&gt;run this command&lt;br/&gt;
db.runCommand( { &quot;geoNear&quot;: &quot;users5&quot;, &quot;near&quot;: &lt;/p&gt;
{ &quot;type&quot;: &quot;Point&quot;, &quot;coordinates&quot;: [ 0,0 ] }
&lt;p&gt;, &quot;spherical&quot; : true } )&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|hspbrr:</customfieldvalue>

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