<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:57:13 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-1506] when sharding on a and need an index on a,b allow only a,b index</title>
                <link>https://jira.mongodb.org/browse/SERVER-1506</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description></description>
                <environment></environment>
        <key id="12583">SERVER-1506</key>
            <summary>when sharding on a and need an index on a,b allow only a,b index</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="matulef">Kevin Matulef</assignee>
                                    <reporter username="eliot">Eliot Horowitz</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Jul 2010 21:12:10 +0000</created>
                <updated>Tue, 21 Aug 2012 02:36:51 +0000</updated>
                            <resolved>Fri, 15 Jun 2012 19:40:01 +0000</resolved>
                                                    <fixVersion>2.1.2</fixVersion>
                                    <component>Sharding</component>
                                        <votes>9</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="133436" author="ian@10gen.com" created="Fri, 15 Jun 2012 19:40:01 +0000"  >&lt;p&gt;Resolved with additional tests to be made covered by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6107&quot; title=&quot;Add more tests for sharding operations with prefix shard key&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6107&quot;&gt;&lt;del&gt;SERVER-6107&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="132824" author="matulef" created="Thu, 14 Jun 2012 19:46:52 +0000"  >&lt;p&gt;An implementation of this feature is now in.  At any given time, you just need to have at least one &quot;useful&quot; index that contains the shard key as a prefix. &lt;/p&gt;

&lt;p&gt;There is one caveat: for an index to be considered &quot;useful&quot; it must not be a multi-key index.  So to use the &quot;a,b&quot; index you must make sure there are no muli-key (array) values for b.  If you ever do insert array values and run out of useful indices, then you won&apos;t be able to do any splits/migrates until a useful index is created (you can always create one on the shard key itself).  &lt;/p&gt;

&lt;p&gt;I created a separate ticket to support multikey indices here: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6095&quot; title=&quot;make multikey indices useful for sharding&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6095&quot;&gt;&lt;del&gt;SERVER-6095&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="132711" author="auto" created="Thu, 14 Jun 2012 16:57:30 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-06-14T09:54:02-07:00&apos;, u&apos;email&apos;: u&apos;matulef@10gen.com&apos;, u&apos;name&apos;: u&apos;Kevin Matulef&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1506&quot; title=&quot;when sharding on a and need an index on a,b allow only a,b index&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1506&quot;&gt;&lt;del&gt;SERVER-1506&lt;/del&gt;&lt;/a&gt; change shard key validation to allow prefixes of existing indices&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/236c41c7766eb4d24716b4b24fd8b76bc6ebc79d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/236c41c7766eb4d24716b4b24fd8b76bc6ebc79d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="120530" author="schwerin" created="Thu, 17 May 2012 15:02:38 +0000"  >&lt;p&gt;@kevin, do you think you can get this done for 2.1.2, along w/ &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2001&quot; title=&quot;option to hash shard key &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2001&quot;&gt;&lt;del&gt;SERVER-2001&lt;/del&gt;&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="81677" author="hoffrocket" created="Mon, 23 Jan 2012 17:06:58 +0000"  >&lt;p&gt;is there an eta for this yet?&lt;/p&gt;</comment>
                            <comment id="63879" author="eliot" created="Tue, 1 Nov 2011 00:01:51 +0000"  >&lt;p&gt;As of now, yes.&lt;/p&gt;</comment>
                            <comment id="63872" author="hoffrocket" created="Mon, 31 Oct 2011 23:09:20 +0000"  >&lt;p&gt;Is this still in for 2.1.1?&lt;/p&gt;</comment>
                            <comment id="46015" author="eliot" created="Wed, 3 Aug 2011 03:22:43 +0000"  >&lt;p&gt;There are more edge cases here than is possible to fully test before 2.0&lt;/p&gt;</comment>
                            <comment id="36449" author="eliot" created="Mon, 6 Jun 2011 19:38:22 +0000"  >&lt;p&gt;@javier That&apos;s the idea.&lt;/p&gt;</comment>
                            <comment id="36448" author="javierferrero" created="Mon, 6 Jun 2011 19:36:39 +0000"  >&lt;p&gt;Furthermore, if I have a compound index on A B C where: &lt;/p&gt;

&lt;p&gt;A is constant. &lt;br/&gt;
B is constant. &lt;br/&gt;
C changes.&lt;/p&gt;

&lt;p&gt;Could I use the index as a compound shard key on A B?&lt;/p&gt;</comment>
                            <comment id="36434" author="javierferrero" created="Mon, 6 Jun 2011 18:48:11 +0000"  >&lt;p&gt;Would this work with compound shard keys? Say I have a compound index on A B C. Can I use that index for a shard key on A B?&lt;/p&gt;</comment>
                            <comment id="25376" author="eliot" created="Mon, 7 Mar 2011 04:58:26 +0000"  >&lt;p&gt;Its a very simple theoretical change, just a fair number of touch points in the code.&lt;/p&gt;</comment>
                            <comment id="25368" author="harryh" created="Sun, 6 Mar 2011 23:18:21 +0000"  >&lt;p&gt;Would love to see this fixed (and possibly backported to 1.8)?&lt;br/&gt;
Seems like it should be straight forward?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="41274">SERVER-6095</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="42035">DOCS-247</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="41431">SERVER-6107</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="44589">SERVER-6493</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="47695">SERVER-6809</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>13.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 6 Mar 2011 23:18:21 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 35 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_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>
                            11 years, 35 weeks, 5 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>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>harryh</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>javierferrero</customfieldvalue>
            <customfieldvalue>hoffrocket</customfieldvalue>
            <customfieldvalue>matulef</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmsvz:</customfieldvalue>

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

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

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