<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:59:15 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-22053] Insertion of Array with undefined/null components.</title>
                <link>https://jira.mongodb.org/browse/SERVER-22053</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Inserts of arrays with undefined/null content in positions are being treated differently in version 3.2.&lt;/p&gt;

</description>
                <environment></environment>
        <key id="245513">SERVER-22053</key>
            <summary>Insertion of Array with undefined/null components.</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="9">Done</resolution>
                                        <assignee username="waley.chen">Waley Chen</assignee>
                                    <reporter username="paul.reed">Paul Reed</reporter>
                        <labels>
                            <label>bkp</label>
                    </labels>
                <created>Mon, 4 Jan 2016 18:46:56 +0000</created>
                <updated>Mon, 8 Jan 2024 15:23:06 +0000</updated>
                            <resolved>Thu, 4 Aug 2016 19:09:57 +0000</resolved>
                                    <version>3.2.0</version>
                                    <fixVersion>3.2.14</fixVersion>
                    <fixVersion>3.3.11</fixVersion>
                                    <component>Shell</component>
                                        <votes>0</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="1564656" author="xgen-internal-githook" created="Thu, 4 May 2017 17:34:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;WaleyChen&apos;, u&apos;name&apos;: u&apos;Waley Chen&apos;, u&apos;email&apos;: u&apos;waleycz@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22053&quot; title=&quot;Insertion of Array with undefined/null components.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22053&quot;&gt;&lt;del&gt;SERVER-22053&lt;/del&gt;&lt;/a&gt; Insertion of Array with undefined/null components&lt;/p&gt;

&lt;p&gt;(cherry picked from commit af198512c7dbb00442fb5115aeac661bf85535c8)&lt;/p&gt;

&lt;p&gt;lint fix&lt;br/&gt;
(cherry picked from commit 9c3c7d8328d50d45206d310d5c63f0197f49ab39)&lt;br/&gt;
Branch: v3.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a9e694a18f25775764c9ef110a6ad6fcdc30569d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a9e694a18f25775764c9ef110a6ad6fcdc30569d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1347601" author="xgen-internal-githook" created="Thu, 4 Aug 2016 19:29:02 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;WaleyChen&apos;, u&apos;name&apos;: u&apos;Waley Chen&apos;, u&apos;email&apos;: u&apos;waleycz@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22053&quot; title=&quot;Insertion of Array with undefined/null components.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22053&quot;&gt;&lt;del&gt;SERVER-22053&lt;/del&gt;&lt;/a&gt; Insertion of Array with undefined/null components&lt;/p&gt;

&lt;p&gt;lint fix&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9c3c7d8328d50d45206d310d5c63f0197f49ab39&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9c3c7d8328d50d45206d310d5c63f0197f49ab39&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1347569" author="xgen-internal-githook" created="Thu, 4 Aug 2016 19:08:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;WaleyChen&apos;, u&apos;name&apos;: u&apos;Waley Chen&apos;, u&apos;email&apos;: u&apos;waleycz@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22053&quot; title=&quot;Insertion of Array with undefined/null components.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-22053&quot;&gt;&lt;del&gt;SERVER-22053&lt;/del&gt;&lt;/a&gt; Insertion of Array with undefined/null components&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/af198512c7dbb00442fb5115aeac661bf85535c8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/af198512c7dbb00442fb5115aeac661bf85535c8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1155443" author="thomas.schubert" created="Wed, 27 Jan 2016 16:56:17 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=paul.reed&quot; class=&quot;user-hover&quot; rel=&quot;paul.reed&quot;&gt;paul.reed&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Sorry for the delay publicly responding. We have identified that this bug was introduced by the switch from V8 to SpiderMonkey as the default JS engine (&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19376&quot; title=&quot;Make SpiderMonkey the default JS Engine&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19376&quot;&gt;&lt;del&gt;SERVER-19376&lt;/del&gt;&lt;/a&gt;). The fix is scheduled to be included in the 3.4 release, and I have requested a backport of this fix to 3.2 branch as well. Please continue to watch this ticket for updates.&lt;/p&gt;

&lt;p&gt;Thank you for the clear reproduction steps,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                            <comment id="1154649" author="paul.reed" created="Tue, 26 Jan 2016 23:38:08 +0000"  >&lt;p&gt;Any news this?&lt;/p&gt;</comment>
                            <comment id="1125509" author="paul.reed" created="Mon, 4 Jan 2016 18:55:36 +0000"  >&lt;p&gt;Just checked and it is only when an item is undefined that the array is truncated. Nulls get passed correctly&lt;/p&gt;

&lt;p&gt;[ undefined, 1 ] inserts to &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;&lt;br/&gt;
[ null, 1 ] inserts to [ null, 1 ]&lt;/p&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="13224">SERVER-1874</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="216462">SERVER-19376</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="13440"><![CDATA[v3.2]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 4 Jan 2016 20:04:42 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 40 weeks, 6 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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 40 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
            <customfieldvalue>paul.reed</customfieldvalue>
            <customfieldvalue>waley.chen</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkldj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsnign:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1066">Platforms 18 (08/05/16)</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Previously to 3.2 when this happened &lt;/p&gt;

&lt;p&gt;var s = []&lt;br/&gt;
s&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; = 1&lt;br/&gt;
print(s) =&amp;gt; [ undefined, 1]&lt;br/&gt;
db.colll.insert(&lt;/p&gt;
{mys:s}
&lt;p&gt;)&lt;/p&gt;

&lt;p&gt;you would get a doc like this:&lt;/p&gt;
{ mys: [ null, 1] }

&lt;p&gt;now in v3.2 you get this document:&lt;/p&gt;

{ mys: [1] }

&lt;p&gt;So the data has shifted up an index. &lt;/p&gt;

&lt;p&gt;Is this a new BUG or an old BUG fixed - cannot find any reference to it elsewhere.&lt;/p&gt;

&lt;p&gt;====&lt;/p&gt;

&lt;p&gt;fyi:&lt;br/&gt;
It has played havoc with some of my Map Reductions which rely on the specific placement of values in an array against a standard header array which I use to populate the array i.e. &lt;br/&gt;
value.arr[ header.indexOf( this.term ) ] = this.avalue;&lt;br/&gt;
emit(..., value)&lt;/p&gt;

&lt;p&gt;I think that there might be an insert between the map and reduction where the array is restructured.&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|hri5nb:</customfieldvalue>

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