<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:58:09 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-1821] Cannot update a collection using $inc modifier using a geo $center query unless the fields already exist in the matched documents </title>
                <link>https://jira.mongodb.org/browse/SERVER-1821</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>
&lt;p&gt;db.createCollection(&quot;points&quot;);&lt;br/&gt;
db.points.ensureIndex( &lt;/p&gt;
{ loc : &quot;2d&quot; }
&lt;p&gt; )&lt;/p&gt;

&lt;p&gt;for(var x = 0; x &amp;lt; 10; x = x + 1) {&lt;br/&gt;
  for(var y = 0; y &amp;lt; 10; y = y + 1) {&lt;br/&gt;
    db.points.insert(&lt;/p&gt;
{&quot;loc&quot;: [x, y]}
&lt;p&gt;);&lt;br/&gt;
  }&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;// Run geo $inc&lt;br/&gt;
db.points.update({&quot;loc&quot; : {&quot;$within&quot; :  &lt;/p&gt;
{&quot;$center&quot; : [[5,5], 2]}
&lt;p&gt;}}, {&apos;$inc&apos; : { &apos;test&apos; : 1}}, false, true);&lt;/p&gt;

&lt;p&gt;/////////////////&lt;br/&gt;
// FAILS: &lt;br/&gt;
// 0x10006e90b 0x10007d47c 0x10015fc70 0x100161759 0x100269532 0x10026b319 0x1003a5822 0x1003b6d84 0x7fff884fa8b6 0x7fff884fa769 &lt;br/&gt;
//  0   mongod                              0x000000010006e90b _ZN5mongo12sayDbContextEPKc + 171&lt;br/&gt;
//  1   mongod                              0x000000010007d47c _ZN5mongo8assertedEPKcS1_j + 284&lt;br/&gt;
//  2   mongod                              0x000000010015fc70 _ZN5mongo14_updateObjectsEbPKcRKNS_7BSONObjES2_bbbRNS_7OpDebugEPNS_11RemoveSaverE + 6864&lt;br/&gt;
//  3   mongod                              0x0000000100161759 _ZN5mongo13updateObjectsEPKcRKNS_7BSONObjES2_bbbRNS_7OpDebugE + 313&lt;br/&gt;
//  4   mongod                              0x0000000100269532 _ZN5mongo14receivedUpdateERNS_7MessageERNS_5CurOpE + 1170&lt;br/&gt;
//  5   mongod                              0x000000010026b319 _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_8SockAddrE + 5513&lt;br/&gt;
//  6   mongod                              0x00000001003a5822 _ZN5mongo10connThreadEPNS_13MessagingPortE + 546&lt;br/&gt;
//  7   mongod                              0x00000001003b6d84 thread_proxy + 132&lt;br/&gt;
//  8   libSystem.B.dylib                   0x00007fff884fa8b6 _pthread_start + 331&lt;br/&gt;
//  9   libSystem.B.dylib                   0x00007fff884fa769 thread_start + 13&lt;br/&gt;
// Mon Sep 20 19:08:35 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn7&amp;#93;&lt;/span&gt;  Caught Assertion in update , continuing&lt;/p&gt;

&lt;p&gt;// Run a non-geo $inc&lt;br/&gt;
db.points.update({}, {&apos;$inc&apos; : { &apos;test&apos; : 1}}, false, true);  &lt;/p&gt;

&lt;p&gt;// No error&lt;/p&gt;

&lt;p&gt;// Re-run geo $inc&lt;br/&gt;
db.points.update({&quot;loc&quot; : {&quot;$within&quot; :  &lt;/p&gt;
{&quot;$center&quot; : [[5,5], 2]}
&lt;p&gt;}}, {&apos;$inc&apos; : { &apos;test&apos; : 1}}, false, true);&lt;/p&gt;

&lt;p&gt;// No error&lt;/p&gt;
</description>
                <environment>OSX 64bit, Snow Leopard, Macbook</environment>
        <key id="13139">SERVER-1821</key>
            <summary>Cannot update a collection using $inc modifier using a geo $center query unless the fields already exist in the matched documents </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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="smurphy">Sam Murphy</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Sep 2010 16:46:18 +0000</created>
                <updated>Tue, 12 Jul 2016 00:17:04 +0000</updated>
                            <resolved>Mon, 22 Nov 2010 05:15:54 +0000</resolved>
                                    <version>1.6.2</version>
                                    <fixVersion>1.7.4</fixVersion>
                                    <component>Geo</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="20192" author="eliot" created="Tue, 9 Nov 2010 22:38:58 +0000"  >&lt;p&gt;this is a bit trickier than expected.&lt;/p&gt;

&lt;p&gt;almost have to make Geo*Cursor yield safe...&lt;/p&gt;</comment>
                            <comment id="18560" author="auto" created="Mon, 27 Sep 2010 15:48:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: test for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1821&quot; title=&quot;Cannot update a collection using $inc modifier using a geo $center query unless the fields already exist in the matched documents &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1821&quot;&gt;&lt;del&gt;SERVER-1821&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/5a5d766199cd952c868484d4c1e3fd880092c291&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/5a5d766199cd952c868484d4c1e3fd880092c291&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="18559" author="smurphy" created="Mon, 27 Sep 2010 15:32:51 +0000"  >&lt;p&gt;It was my understanding from the documentation that an $inc will create fields if they do not exist. In the test file the &quot;z&quot; field is created prior to using an $inc. I believe that removing that will create an error. &lt;/p&gt;

&lt;p&gt;Is is expected that the fields being incremented have to exist in advance?&lt;/p&gt;</comment>
                            <comment id="18503" author="eliot" created="Fri, 24 Sep 2010 19:17:15 +0000"  >&lt;p&gt;Added a test that does exactly this that seems to work fine.&lt;br/&gt;
Can you try running and see what happens?&lt;br/&gt;
mongo jstests/geo_update1.js&lt;/p&gt;</comment>
                            <comment id="18502" author="auto" created="Fri, 24 Sep 2010 19:16:50 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: test for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1821&quot; title=&quot;Cannot update a collection using $inc modifier using a geo $center query unless the fields already exist in the matched documents &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1821&quot;&gt;&lt;del&gt;SERVER-1821&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/f8da5e06860a0d5e0fd7b5637fcc748127cfbcc3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/f8da5e06860a0d5e0fd7b5637fcc748127cfbcc3&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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 24 Sep 2010 19:16:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 15 weeks, 1 day 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>
                            13 years, 15 weeks, 1 day 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>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>smurphy</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpeqv:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21814</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|ht0hjb:</customfieldvalue>

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