<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:27:30 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-12068] Exception generated from update for 2d index, $near update</title>
                <link>https://jira.mongodb.org/browse/SERVER-12068</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Found in QA-322, update_geo_dedup.js&lt;/p&gt;

&lt;p&gt;The behavior exists in 2.4.6 as follows:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Assertion in mongod&lt;br/&gt;
Thu Dec 12 11:43:48.215 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn1&amp;#93;&lt;/span&gt; Assertion: 10334:BSONObj size: -286331154 (0xEEEEEEEE) is invalid. Size must be between 0 and 16793600(16MB) First element: _id: ObjectId(&apos;52a9e7a29013d3eba0228d38&apos;)&lt;br/&gt;
0x10044ac7b 0x1004246ce 0x10042478d 0x10007e6d7 0x1003b6a2c 0x100246982 0x10024861f 0x1001eaf9b 0x1001ee3e1 0x10000b9a2 0x100440669 0x10047d815 0x7fff9435e772 0x7fff9434b1a1&lt;br/&gt;
 0   mongod                              0x000000010044ac7b _ZN5mongo15printStackTraceERSo + 43&lt;br/&gt;
 1   mongod                              0x00000001004246ce _ZN5mongo11msgassertedEiPKc + 174&lt;br/&gt;
 2   mongod                              0x000000010042478d _ZN5mongo11msgassertedEiRKSs + 29&lt;br/&gt;
 3   mongod                              0x000000010007e6d7 _ZNK5mongo7BSONObj14_assertInvalidEv + 1255&lt;br/&gt;
 4   mongod                              0x00000001003b6a2c _ZN5mongo7BSONObjC1EPKc + 44&lt;br/&gt;
 5   mongod                              0x0000000100246982 _ZN5mongo14_updateObjectsEbPKcRKNS_7BSONObjES4_bbbRNS_7OpDebugEPNS_11RemoveSaverEbRKNS_24QueryPlanSelectionPolicyEb + 6626&lt;br/&gt;
 6   mongod                              0x000000010024861f _ZN5mongo13updateObjectsEPKcRKNS_7BSONObjES4_bbbRNS_7OpDebugEbRKNS_24QueryPlanSelectionPolicyE + 127&lt;br/&gt;
 7   mongod                              0x00000001001eaf9b _ZN5mongo14receivedUpdateERNS_7MessageERNS_5CurOpE + 1643&lt;br/&gt;
 8   mongod                              0x00000001001ee3e1 _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 6193&lt;br/&gt;
 9   mongod                              0x000000010000b9a2 _ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE + 198&lt;br/&gt;
 10  mongod                              0x0000000100440669 _ZN5mongo17PortMessageServer17handleIncomingMsgEPv + 1657&lt;br/&gt;
 11  mongod                              0x000000010047d815 thread_proxy + 229&lt;br/&gt;
 12  libsystem_c.dylib                   0x00007fff9435e772 _pthread_start + 327&lt;br/&gt;
 13  libsystem_c.dylib                   0x00007fff9434b1a1 thread_start + 13&lt;br/&gt;
Thu Dec 12 11:43:48.245 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn1&amp;#93;&lt;/span&gt; update test.jstests_geo_deduplication query: 
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { locs}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt; update: &lt;/p&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { $inc}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt; nscanned:2 nmoved:1 keyUpdates:0 exception: BSONObj size: -286331154 (0xEEEEEEEE) is invalid. Size must be between 0 and 16793600(16MB) First element: _id: ObjectId(&apos;52a9e7a29013d3eba0228d38&apos;) code:10334 locks(micros) w:36357 36ms&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Mongo shell (client) sees the following:&lt;br/&gt;
&amp;gt; t.update({locs: {$near: &lt;span class=&quot;error&quot;&gt;&amp;#91;50.0, 50.0&amp;#93;&lt;/span&gt;}}, {$inc: {touchCount: 1}}, false, true);&lt;br/&gt;
&amp;gt; db.getLastErrorObj()&lt;/p&gt;
{ &quot;n&quot; : 0, &quot;connectionId&quot; : 1, &quot;err&quot; : null, &quot;ok&quot; : 1 }
&lt;p&gt;&amp;gt; t.find()&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;52a9e7a29013d3eba0228d38&quot;), &quot;locs&quot; : [  [  49.999,  49.999 ],  [  50,  50 ],  [  50.001,  50.001 ] ], &quot;touchCount&quot; : 1 }

&lt;p&gt;In 2.5.4 the behavior is similar but the error is propagated back to the user:&lt;/p&gt;

&lt;p&gt;&amp;gt; t.update({locs: {$near: &lt;span class=&quot;error&quot;&gt;&amp;#91;50.0, 50.0&amp;#93;&lt;/span&gt;}}, {$inc: {touchCount: 1}}, false, true);&lt;br/&gt;
Update WriteResult(&lt;/p&gt;
{
	&quot;errmsg&quot; : &quot;exception: BSONObj size: -286331154 (0xEEEEEEEE) is invalid. Size must be between 0 and 16793600(16MB) First element: locs: [ [ 49.999, 49.999 ], [ 50.0, 50.0 ], [ 50.001, 50.001 ] ]&quot;,
	&quot;code&quot; : 10334,
	&quot;ok&quot; : 0
})
&amp;gt; db.getLastErrorObj()
{
	&quot;err&quot; : &quot;BSONObj size: -286331154 (0xEEEEEEEE) is invalid. Size must be between 0 and 16793600(16MB) First element: locs: [ [ 49.999, 49.999 ], [ 50.0, 50.0 ], [ 50.001, 50.001 ] ]&quot;,
	&quot;code&quot; : 10334,
	&quot;n&quot; : 0,
	&quot;connectionId&quot; : 10,
	&quot;ok&quot; : 1
}
&amp;gt; t.find()
{ &quot;_id&quot; : ObjectId(&quot;52a9e69d7710093746faf850&quot;), &quot;locs&quot; : [  [  49.999,  49.999 ],  [  50,  50 ],  [  50.001,  50.001 ] ], &quot;touchCount&quot; : 1 }
</description>
                <environment>Observed in standalone environment on Mac OS, but seems to be generic</environment>
        <key id="102042">SERVER-12068</key>
            <summary>Exception generated from update for 2d index, $near update</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="benety.goh@mongodb.com">Benety Goh</assignee>
                                    <reporter username="jonathan.abrahams">Jonathan Abrahams</reporter>
                        <labels>
                            <label>26qa</label>
                    </labels>
                <created>Thu, 12 Dec 2013 17:21:54 +0000</created>
                <updated>Mon, 27 Jan 2014 15:06:55 +0000</updated>
                            <resolved>Thu, 23 Jan 2014 17:01:53 +0000</resolved>
                                    <version>2.4.6</version>
                    <version>2.5.4</version>
                                                    <component>Geo</component>
                    <component>Index Maintenance</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="488097" author="jonathan.abrahams" created="Mon, 27 Jan 2014 15:06:55 +0000"  >&lt;p&gt;Verified in &quot;gitVersion&quot; : &quot;c51857a44af6fc69f1e21bb9c6b2b6adda0ef80e&quot;&lt;/p&gt;</comment>
                            <comment id="488096" author="jonathan.abrahams" created="Mon, 27 Jan 2014 15:05:34 +0000"  >&lt;p&gt;Latest nightly no longer has this issue: &lt;/p&gt;

&lt;p&gt;	&quot;version&quot; : &quot;2.5.5-pre-&quot;,&lt;br/&gt;
	&quot;gitVersion&quot; : &quot;c51857a44af6fc69f1e21bb9c6b2b6adda0ef80e&quot;,&lt;br/&gt;
	&quot;OpenSSLVersion&quot; : &quot;&quot;,&lt;br/&gt;
	&quot;sysInfo&quot; : &quot;Darwin bs-osx-108-x86-64-2.10gen.cc 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49&quot;,&lt;/p&gt;</comment>
                            <comment id="484868" author="benety.goh" created="Tue, 21 Jan 2014 14:56:07 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jonathan.abrahams&quot; class=&quot;user-hover&quot; rel=&quot;jonathan.abrahams&quot;&gt;jonathan.abrahams&lt;/a&gt;, I tried this on 2.5.5-pre (git version: df45324b26d66f8a5155a0a9799b0ba000544ebb) with the attached js test script and it passed for me. Can we resolve this?&lt;/p&gt;</comment>
                            <comment id="476740" author="dan@10gen.com" created="Fri, 3 Jan 2014 04:33:24 +0000"  >&lt;p&gt;I think this is a duplicate or related to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12120&quot; title=&quot;geo $near deduping is not working&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12120&quot;&gt;&lt;del&gt;SERVER-12120&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="473371" author="jonathan.abrahams" created="Thu, 19 Dec 2013 20:56:30 +0000"  >&lt;p&gt;Reproduced it from fresh build: 2.5.5-pre- (git version: c2f072309bf3d5e64757ebf49d98c005f3c47498) (modules: subscription)&lt;/p&gt;

&lt;p&gt;&amp;gt; var t = db.jstests_geo_deduplication;&lt;br/&gt;
&amp;gt; t.drop();&lt;br/&gt;
true&lt;br/&gt;
&amp;gt; t.ensureIndex( &lt;/p&gt;
{locs: &quot;2d&quot;}
&lt;p&gt;  );&lt;br/&gt;
&amp;gt; t.save( &lt;/p&gt;
{locs: [[49.999,49.999], [50.0,50.0], [50.001,50.001]]}
&lt;p&gt;  );&lt;br/&gt;
Insert WriteResult({ &quot;ok&quot; : 1, &quot;nDocsModified&quot; : 0, &quot;n&quot; : 1, &quot;writeConcernError&quot; : { } })&lt;br/&gt;
&amp;gt; t.update({locs: {$near: &lt;span class=&quot;error&quot;&gt;&amp;#91;50.0, 50.0&amp;#93;&lt;/span&gt;}}, {$inc: {touchCount: 1}}, false, true);&lt;br/&gt;
Update WriteResult({&lt;br/&gt;
	&quot;ok&quot; : 1,&lt;br/&gt;
	&quot;nDocsModified&quot; : 0,&lt;br/&gt;
	&quot;n&quot; : 0,&lt;br/&gt;
	&quot;writeErrors&quot; : [&lt;/p&gt;
		{
			&quot;index&quot; : 0,
			&quot;code&quot; : 1,
			&quot;errmsg&quot; : &quot; Update query failed -- RUNNER_ERROR&quot;
		}
&lt;p&gt;	]&lt;br/&gt;
})&lt;/p&gt;</comment>
                            <comment id="473050" author="dan@10gen.com" created="Thu, 19 Dec 2013 13:01:25 +0000"  >&lt;p&gt;I cannot reproduce this on 2.5.5-pre (git version: 22a03afae8a1a3b9e9218e8e9985f5bfb8d9ac04) &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="102740">SERVER-12120</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="36472" name="server12068.js" size="286" author="benety.goh@mongodb.com" created="Tue, 21 Jan 2014 14:54:06 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 19 Dec 2013 13:01:25 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 3 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>
                            10 years, 3 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>benety.goh@mongodb.com</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>jonathan.abrahams</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrm5lr:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>93364</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;var t = db.jstests_geo_deduplication;&lt;/p&gt;

&lt;p&gt;// 2d index with $near&lt;br/&gt;
t.drop();&lt;br/&gt;
t.ensureIndex(&lt;/p&gt;
{locs: &quot;2d&quot;}
&lt;p&gt;);&lt;br/&gt;
t.save(&lt;/p&gt;
{locs: [[49.999,49.999], [50.0,50.0], [50.001,50.001]]}
&lt;p&gt;);&lt;/p&gt;

&lt;p&gt;t.update({locs: {$near: &lt;span class=&quot;error&quot;&gt;&amp;#91;50.0, 50.0&amp;#93;&lt;/span&gt;}}, {$inc: {touchCount: 1}}, false, true);&lt;br/&gt;
assert.eq(1, db.getLastErrorObj().n);&lt;br/&gt;
e&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10166" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Tests Written</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10154"><![CDATA[Complete]]></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|hsp26f:</customfieldvalue>

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