<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:18:00 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-8656]  Updating pre-existing numeric fields (intermittently) causes documents to be moved?</title>
                <link>https://jira.mongodb.org/browse/SERVER-8656</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Originally posted here: &lt;a href=&quot;https://groups.google.com/forum/?hl=en&amp;amp;fromgroups=#!topic/mongodb-user/T-NpDM6G0aM&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/?hl=en&amp;amp;fromgroups=#!topic/mongodb-user/T-NpDM6G0aM&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sun Feb 17 04:11:31 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn218&amp;#93;&lt;/span&gt; update doc_metadata.metadata query: &lt;/p&gt;
{ entities.index: &quot;philip morris/company&quot;, communityId: ObjectId(&apos;4c927585d591d31d7b37097a&apos;)) }
&lt;p&gt; update: { $set: &lt;/p&gt;
{ entities.$.totalfrequency: 117, entities.$.doccount: 72 }
&lt;p&gt; } nscanned:107 nmoved:55 nupdated:72 numYields: 32 locks(micros) w:59851387 30783ms&lt;/p&gt;

&lt;p&gt;I&apos;m trying to understand why nmoved&amp;gt;0 when my objects are all pre-populated as numeric (longs, via the Java driver)&lt;/p&gt;

&lt;p&gt;The thread includes some relevant gists:&lt;br/&gt;
&lt;a href=&quot;https://gist.github.com/Alex-Ikanow/4979336&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/Alex-Ikanow/4979336&lt;/a&gt; - collection stats&lt;br/&gt;
&lt;a href=&quot;https://gist.github.com/Alex-Ikanow/4979375&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/Alex-Ikanow/4979375&lt;/a&gt; - example object&lt;/p&gt;

&lt;p&gt;One thing I noticed in the example object is that some of the numbers are wrapped in NumberLong and some aren&apos;t - what determines this? &lt;/p&gt;
</description>
                <environment>Centos 5.5/6.3, driver 2.7.3</environment>
        <key id="66046">SERVER-8656</key>
            <summary> Updating pre-existing numeric fields (intermittently) causes documents to be moved?</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="apiggott@ikanow.com">Alex Piggott</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Feb 2013 22:12:44 +0000</created>
                <updated>Fri, 7 Mar 2014 00:15:04 +0000</updated>
                            <resolved>Mon, 25 Feb 2013 19:10:10 +0000</resolved>
                                    <version>2.2.3</version>
                                                    <component>Write Ops</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="275165" author="apiggott@ikanow.com" created="Mon, 25 Feb 2013 13:56:26 +0000"  >&lt;p&gt;Oh I see, the issue is that if you use com.mongodb.util.JSON.parse to generate a DBObject, then it uses int32 for all integer fields that are smaller than INT_MAX (&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/util/JSON.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/util/JSON.java&lt;/a&gt;, parseNumber(), line 454)&lt;/p&gt;

&lt;p&gt;Personally I don&apos;t like that design decision, especially since objects are unnecessarily large anyway because of the inclusion of field names. But it&apos;s not a big deal, since there are alternative ways of creating DBObjects from JSON.&lt;/p&gt;

&lt;p&gt;I don&apos;t seem to be able to close this, can someone do the honors?&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>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 51 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, 51 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>apiggott@ikanow.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrn5ef:</customfieldvalue>

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

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

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