<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:24:47 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-11064] Stricter validation of index key patterns during index creation and startup</title>
                <link>https://jira.mongodb.org/browse/SERVER-11064</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The values in the index key pattern will be restricted to&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;numbers &amp;gt; 0 (ascending)&lt;/li&gt;
	&lt;li&gt;numbers &amp;lt; 0 (descending)&lt;/li&gt;
	&lt;li&gt;strings (special index types)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Some specific values that may be of interest for which an error will be returned under the new scheme:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;0&lt;/li&gt;
	&lt;li&gt;NaN&lt;/li&gt;
	&lt;li&gt;undefined and null&lt;/li&gt;
	&lt;li&gt;true and false&lt;/li&gt;
	&lt;li&gt;MinKey and MaxKey&lt;/li&gt;
&lt;/ul&gt;


&lt;hr /&gt;

&lt;h6&gt;&lt;a name=&quot;Originaldescription&quot;&gt;&lt;/a&gt;Original description&lt;/h6&gt;

&lt;p&gt;ensureIndex permits any numeric value to be passed as the sort order.  Negative values indicate descending order, greater than or equal to zero indicate ascending.&lt;/p&gt;

&lt;p&gt;We should just limit to 1 and -1.&lt;/p&gt;

&lt;p&gt;This was partially fixed with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-5826&quot; title=&quot;Creating an index using a non-existing plugin should be an error not a warning&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-5826&quot;&gt;&lt;del&gt;SERVER-5826&lt;/del&gt;&lt;/a&gt;, but only applies to non-numeric values.&lt;/p&gt;</description>
                <environment></environment>
        <key id="93087">SERVER-11064</key>
            <summary>Stricter validation of index key patterns during index creation and startup</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="max.hirschhorn@mongodb.com">Max Hirschhorn</assignee>
                                    <reporter username="oleg@evergage.com">Oleg Rekutin</reporter>
                        <labels>
                            <label>neweng</label>
                            <label>query_triage</label>
                    </labels>
                <created>Mon, 7 Oct 2013 20:22:14 +0000</created>
                <updated>Fri, 17 May 2019 13:43:42 +0000</updated>
                            <resolved>Wed, 27 Jan 2016 15:39:02 +0000</resolved>
                                    <version>2.4.6</version>
                                    <fixVersion>3.3.1</fixVersion>
                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="1155290" author="xgen-internal-githook" created="Wed, 27 Jan 2016 15:38:35 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;visemet&apos;, u&apos;name&apos;: u&apos;Max Hirschhorn&apos;, u&apos;email&apos;: u&apos;max.hirschhorn@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-11064&quot; title=&quot;Stricter validation of index key patterns during index creation and startup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-11064&quot;&gt;&lt;del&gt;SERVER-11064&lt;/del&gt;&lt;/a&gt; Stricter validation of index key patterns.&lt;/p&gt;

&lt;p&gt;Each value in the index key pattern must be one of the following:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;a number &amp;gt; 0 (ascending)&lt;/li&gt;
	&lt;li&gt;a number &amp;lt; 0 (descending)&lt;/li&gt;
	&lt;li&gt;a string (special index type)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Since the key pattern is validated on startup for all existing indexes,&lt;br/&gt;
mongod will fail to start up if an index not meeting the above criteria&lt;br/&gt;
exists.&lt;/p&gt;

&lt;p&gt;Additionally, if an index with an invalid key pattern is replicated from&lt;br/&gt;
an older version, then newer versions of mongod running in a&lt;br/&gt;
mixed-version replica set will fassert().&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ffe490c80ecea03b02a0b20d55915c4efd2805e8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ffe490c80ecea03b02a0b20d55915c4efd2805e8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1153122" author="max.hirschhorn@10gen.com" created="Mon, 25 Jan 2016 20:24:03 +0000"  >&lt;p&gt;Updating the description of this ticket after discussing with members of the drivers team about the following two questions:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Do any current or legacy drivers perform an internal operation to an create index (e.g. GridFS) that uses a value other than strings, numbers &amp;gt; 0, or numbers &amp;lt; 0?&lt;/li&gt;
	&lt;li&gt;Does the programming language of any current or legacy driver encourage using values for specifying an index type/direction other than with strings, numbers &amp;gt; 0, or numbers &amp;lt; 0?&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="1119537" author="david.storch" created="Mon, 21 Dec 2015 16:18:36 +0000"  >&lt;p&gt;Not sure that we should disallow numeric values other than +1/-1, but it seems non-controversial to reject the following kinds of values:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;NaN&lt;/li&gt;
	&lt;li&gt;undefined&lt;/li&gt;
	&lt;li&gt;JavaScript code&lt;/li&gt;
	&lt;li&gt;BinData&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="455042" author="david.storch" created="Tue, 12 Nov 2013 18:07:28 +0000"  >&lt;p&gt;Attaching a js test that should pass once this issue is resolved.&lt;/p&gt;</comment>
                            <comment id="436821" author="oleg@evergage.com" created="Mon, 7 Oct 2013 20:31:06 +0000"  >&lt;p&gt;Sort direction &quot;0&quot; is not a valid direction. This is what causes this behavior. PEBKAC, sorry. You can close this as invalid. Or change this issue in having ensureIndices validate the input, such that you can&apos;t create an index with an invalid sort direction.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <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="260716">DOCS-7038</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="108274">SERVER-12538</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="324212">SERVER-26659</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="38486">SERVER-5826</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="97080">SERVER-11568</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="241031">SERVER-21663</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="95758">SERVER-11374</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="33757" name="server11064.js" size="1256" author="david.storch@mongodb.com" created="Tue, 12 Nov 2013 18:07:28 +0000"/>
                            <attachment id="33840" name="server11064.patch" size="819" author="david.storch@mongodb.com" created="Thu, 14 Nov 2013 15:29:00 +0000"/>
                    </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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10012"><![CDATA[Major Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 12 Nov 2013 18:07:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 3 weeks 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>
                            8 years, 3 weeks 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_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>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
            <customfieldvalue>oleg@evergage.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmd5j:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4067</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="859">Query F (02/01/16)</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_11861" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>User Summary</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11856"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsp9e7:</customfieldvalue>

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