<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:52:35 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-61501] Create sharding suite where collections are clustered by default</title>
                <link>https://jira.mongodb.org/browse/SERVER-61501</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Similar to the passthrough suite, it would be nice to have a similar sharding suite.&lt;/p&gt;


&lt;p&gt;One issue in this could potentially be running into duplicate key errors if the collection is clustered by _id, but sharded on a different shardKey&lt;/p&gt;</description>
                <environment></environment>
        <key id="1925710">SERVER-61501</key>
            <summary>Create sharding suite where collections are clustered by default</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="13201">Fixed</resolution>
                                        <assignee username="haley.connelly@mongodb.com">Haley Connelly</assignee>
                                    <reporter username="haley.connelly@mongodb.com">Haley Connelly</reporter>
                        <labels>
                            <label>PM-2311-M2</label>
                    </labels>
                <created>Mon, 15 Nov 2021 20:51:08 +0000</created>
                <updated>Sun, 29 Oct 2023 21:45:59 +0000</updated>
                            <resolved>Thu, 27 Jan 2022 18:37:06 +0000</resolved>
                                                    <fixVersion>5.3.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4318977" author="xgen-internal-githook" created="Thu, 27 Jan 2022 18:04:05 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Haley Connelly&apos;, &apos;email&apos;: &apos;haley.connelly@mongodb.com&apos;, &apos;username&apos;: &apos;haleyConnelly&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-61501&quot; title=&quot;Create sharding suite where collections are clustered by default&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-61501&quot;&gt;&lt;del&gt;SERVER-61501&lt;/del&gt;&lt;/a&gt; Create sharding suite where collections are clustered by default&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e164041d38bc3c1ac0e902ddd432cfb996fb9e58&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e164041d38bc3c1ac0e902ddd432cfb996fb9e58&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4277013" author="haley.connelly" created="Wed, 5 Jan 2022 19:41:47 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&gt;&#160;The goal of this was to take tests in jstests/sharding directory and modify them to be sharding on a clustered collection.&lt;/p&gt;

&lt;p&gt;These tests do exercise chunk migration, which is what we are aiming to test.&lt;/p&gt;

&lt;p&gt;For the duplicate key case, I was (not so clearly) referring to the issue that the cluster key must be unique - like a global unique index. We currently don&apos;t support unique indexes on a sharded collection when the collection is sharded on a different shard key.&lt;/p&gt;


&lt;p&gt;Edit: however - we don&apos;t currently enforce global _id uniqueness upon insert.&lt;br/&gt;
suppose we have a regular sharded collection: * chunks [a: minKey, a: 0), [a: 0, a: maxKey)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;insert({a: -100, _id: 1})&lt;/li&gt;
	&lt;li&gt;insert ({a: 20, _id: 1})&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&#160;we don&apos;t error until trying to do chunk migration. Thus, we should be okay with just altering tests to create clustered collection by default.&lt;/p&gt;</comment>
                            <comment id="4202365" author="max.hirschhorn@10gen.com" created="Sat, 20 Nov 2021 02:37:40 +0000"  >&lt;blockquote&gt;
&lt;p&gt;One issue in this could potentially be running into duplicate key errors if the collection is clustered by _id, but sharded on a different shardKey&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The choice of &lt;a href=&quot;https://github.com/mongodb/mongo/blob/eb2bfbb0ab0c77f47349da0417ac63deff7a34e0/jstests/libs/override_methods/implicitly_shard_accessed_collections.js#L63&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;{&amp;#95;id: &quot;hashed&quot;}&lt;/a&gt; is for a couple reasons:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;The chunk ranges will be pre&amp;#45;split for a hashed shard key. It is possible to achieve the same effect for range&amp;#45;based sharding using zones, for example, see &lt;a href=&quot;https://github.com/mongodb/mongo/blob/eb2bfbb0ab0c77f47349da0417ac63deff7a34e0/jstests/sharding/libs/create_sharded_collection_util.js#L12&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CreateShardedCollectionUtil.shardCollectionWithChunks()&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;Every document written across all tests will have an &amp;#95;id field. This means it is very likely for {&amp;#95;id: &quot;hashed&quot;} to end up with documents on both shards. If instead the field was missing most of the time, then all of those documents would end up in the same chunk on the same shard. An alternative which would be suitable for range&amp;#45;based sharding could have been to inject a field with a randomly&amp;#45;generated value via a runCommand() override.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Notably, the goal of pre&amp;#45;splitting and distributing the collection data across multiple shards is to exercise the targeting logic in mongos where some operations must broadcast to all shards and &lt;em&gt;isn&apos;t&lt;/em&gt; to exercise chunk migration. In general, I skeptical of the amount of chunk migration which ever happens via the balancer in our sharding passthrough testing, including for the concurrency suites.&lt;/p&gt;

&lt;p&gt;I couldn&apos;t tell from the description what the interesting interaction(s) are between clustered collections and sharded collections for why an {&amp;#95;id: &quot;hashed&quot;} shard key pattern might be undesirable.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1968661">SERVER-62874</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1965133">SERVER-62688</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</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>Sat, 20 Nov 2021 02:37:40 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 1 week, 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2311</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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 1 week, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>haley.connelly@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0aemn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hztrbj:</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="5424">Execution Team 2021-12-27</customfieldvalue>
    <customfieldvalue id="5550">Execution Team 2022-01-10</customfieldvalue>
    <customfieldvalue id="5551">Execution Team 2022-01-24</customfieldvalue>
    <customfieldvalue id="5552">Execution Team 2022-02-07</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|i0a0rz:</customfieldvalue>

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