<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:13:02 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-26726] Check number of arguments for createIndex() and throw error if more than two arguments</title>
                <link>https://jira.mongodb.org/browse/SERVER-26726</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If a third argument is passed to the ensureIndex() with valid options, then the behavior is to ignore the third argument instead of an error. So for example, if I execute the following&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.myColl.ensureIndex( { my_date: 1}, {expireAfterSeconds: 2678400},{background: true, sparse: true } ) &lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;the third argument which is critical to the purpose of this index build is completely ignored and the index is built in the foreground with no sparse option. This can lead to catastrophic events if myColl is very large and foreground index was not a choice. Can this be fixed so a user is not punished for accidentally passing the critical options as a third argument in the index build? The version we tried this is 3.2.9&lt;/p&gt;</description>
                <environment></environment>
        <key id="325927">SERVER-26726</key>
            <summary>Check number of arguments for createIndex() and throw error if more than two arguments</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="nikita.lapkov@mongodb.com">Nikita Lapkov</assignee>
                                    <reporter username="manan@indeed.com">Manan Shah</reporter>
                        <labels>
                            <label>move-sa</label>
                            <label>neweng</label>
                            <label>qexec-team</label>
                    </labels>
                <created>Fri, 21 Oct 2016 16:32:04 +0000</created>
                <updated>Thu, 4 Mar 2021 22:52:45 +0000</updated>
                            <resolved>Mon, 24 Aug 2020 08:20:55 +0000</resolved>
                                    <version>3.2.9</version>
                                    <fixVersion>4.7.0</fixVersion>
                    <fixVersion>4.2.10</fixVersion>
                    <fixVersion>4.4.2</fixVersion>
                    <fixVersion>4.0.21</fixVersion>
                    <fixVersion>3.6.21</fixVersion>
                                    <component>Shell</component>
                                        <votes>5</votes>
                                    <watches>12</watches>
                                                                                                                <comments>
                            <comment id="3386906" author="xgen-internal-githook" created="Fri, 11 Sep 2020 09:15:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nikita Lapkov&apos;, &apos;email&apos;: &apos;nikita.lapkov@mongodb.com&apos;, &apos;username&apos;: &apos;laplab&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26726&quot; title=&quot;Check number of arguments for createIndex() and throw error if more than two arguments&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26726&quot;&gt;&lt;del&gt;SERVER-26726&lt;/del&gt;&lt;/a&gt; Check number of arguments for createIndex, createIndexes and ensureIndex shell commands&lt;/p&gt;

&lt;p&gt;(cherry picked from commit be07da4bd6dd394947236857f5510a7ba9c3b0a4)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/df22315f799b9440941539e288caf9a53b8ecb7c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/df22315f799b9440941539e288caf9a53b8ecb7c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3384150" author="xgen-internal-githook" created="Wed, 9 Sep 2020 21:11:02 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nikita Lapkov&apos;, &apos;email&apos;: &apos;nikita.lapkov@mongodb.com&apos;, &apos;username&apos;: &apos;laplab&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26726&quot; title=&quot;Check number of arguments for createIndex() and throw error if more than two arguments&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26726&quot;&gt;&lt;del&gt;SERVER-26726&lt;/del&gt;&lt;/a&gt; Check number of arguments for createIndex, createIndexes and ensureIndex shell commands&lt;/p&gt;

&lt;p&gt;(cherry picked from commit be07da4bd6dd394947236857f5510a7ba9c3b0a4)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c209bf2d265b59765ee07765654a257abfe76a2a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c209bf2d265b59765ee07765654a257abfe76a2a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3381743" author="xgen-internal-githook" created="Wed, 9 Sep 2020 11:39:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nikita Lapkov&apos;, &apos;email&apos;: &apos;nikita.lapkov@mongodb.com&apos;, &apos;username&apos;: &apos;laplab&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26726&quot; title=&quot;Check number of arguments for createIndex() and throw error if more than two arguments&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26726&quot;&gt;&lt;del&gt;SERVER-26726&lt;/del&gt;&lt;/a&gt; Check number of arguments for createIndex, createIndexes and ensureIndex shell commands&lt;/p&gt;

&lt;p&gt;(cherry picked from commit be07da4bd6dd394947236857f5510a7ba9c3b0a4)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/cc8e51c57669e792ac025660428dbfd6a29e09dd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/cc8e51c57669e792ac025660428dbfd6a29e09dd&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3381731" author="xgen-internal-githook" created="Wed, 9 Sep 2020 11:30:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nikita Lapkov&apos;, &apos;email&apos;: &apos;nikita.lapkov@mongodb.com&apos;, &apos;username&apos;: &apos;laplab&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26726&quot; title=&quot;Check number of arguments for createIndex() and throw error if more than two arguments&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26726&quot;&gt;&lt;del&gt;SERVER-26726&lt;/del&gt;&lt;/a&gt; Check number of arguments for createIndex, createIndexes and ensureIndex shell commands&lt;/p&gt;

&lt;p&gt;(cherry picked from commit be07da4bd6dd394947236857f5510a7ba9c3b0a4)&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d7a970f6b1d87fc4c3754cd53f0ea4ea6bd7caf6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d7a970f6b1d87fc4c3754cd53f0ea4ea6bd7caf6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3352633" author="manan@indeed.com" created="Fri, 21 Aug 2020 17:16:08 +0000"  >&lt;p&gt;Thanks for the update.&lt;/p&gt;</comment>
                            <comment id="3352625" author="JIRAUSER1255444" created="Fri, 21 Aug 2020 17:12:54 +0000"  >&lt;p&gt;Hey! To fix this issue we have added validation of number of arguments in shell functions createIndex, createIndexes and ensureIndex. Changes will be backported to versions 4.4, 4.2, 4.0 and 3.6&lt;/p&gt;</comment>
                            <comment id="3352611" author="xgen-internal-githook" created="Fri, 21 Aug 2020 17:07:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nikita Lapkov&apos;, &apos;email&apos;: &apos;nikita.lapkov@mongodb.com&apos;, &apos;username&apos;: &apos;laplab&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-26726&quot; title=&quot;Check number of arguments for createIndex() and throw error if more than two arguments&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-26726&quot;&gt;&lt;del&gt;SERVER-26726&lt;/del&gt;&lt;/a&gt; Check number of arguments for createIndex, createIndexes and ensureIndex shell commands&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/be07da4bd6dd394947236857f5510a7ba9c3b0a4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/be07da4bd6dd394947236857f5510a7ba9c3b0a4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1569712" author="manan@indeed.com" created="Fri, 12 May 2017 14:48:00 +0000"  >&lt;p&gt;Is there an update here?&lt;/p&gt;</comment>
                            <comment id="1414919" author="manan@indeed.com" created="Fri, 21 Oct 2016 22:32:41 +0000"  >&lt;p&gt;Thanks. That would be a reasonable request.&lt;/p&gt;</comment>
                            <comment id="1414788" author="ramon.fernandez" created="Fri, 21 Oct 2016 19:47:34 +0000"  >&lt;p&gt;If I understand correctly, this is a &quot;feature&quot; in JavaScript, so I&apos;m repurposing this as an improvement request and sending it to the Platforms team to evaluate whether the shell can be improved here to protect against this case.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&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="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="1450080">DOCS-13846</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="652968">SERVER-38592</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.4]]></customfieldvalue>
    <customfieldvalue key="16775"><![CDATA[v4.2]]></customfieldvalue>
    <customfieldvalue key="15640"><![CDATA[v4.0]]></customfieldvalue>
    <customfieldvalue key="15141"><![CDATA[v3.6]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000ZQbD0IAL, 500A000000Yg4CJIAZ, 500A000000ZrhhkIAB, 500A000000aupIfIAI, 500A000000bz3UsIAI, 5002K00000czalXQAQ, 5002K00000f0lRLQAY, 5002K00000iOexMQAS, 5002K00000nBjzkQAC, 5002K00000pE7p3QAC, 5002K00000tUHfkQAG]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 21 Oct 2016 19:46:13 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 21 weeks, 5 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_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Added validation of number of arguments for shell functions ensureIndex, createIndex and  createIndexes. Arguments handling or functions behaviour is not changed.</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16942"><![CDATA[Needed]]></customfieldvalue>

                        </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>backlog-server-pm</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 21 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>manan@indeed.com</customfieldvalue>
            <customfieldvalue>nikita.lapkov@mongodb.com</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrjsvr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr4ze7:</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="3612">Query 2020-08-24</customfieldvalue>
    <customfieldvalue id="3614">Query 2020-09-07</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_17051" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Teams Impacted</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16944"><![CDATA[Docs]]></customfieldvalue>
    <customfieldvalue key="16945"><![CDATA[Drivers]]></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|hsaamf:</customfieldvalue>

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