<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:43: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-58104] config.system.sessions collection can end up with invalid chunks if it is dropped and re-sharded with a shard key other than _id</title>
                <link>https://jira.mongodb.org/browse/SERVER-58104</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The balancer assumes that the sessions collection is always sharded by _id. So the split points it uses are always &lt;a href=&quot;https://github.com/mongodb/mongo/blob/1bddf8a6bd027b9cadd52cfdc1711be0e0634089/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp#L254-L270&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;computed based on _id.id&lt;/a&gt;. So if a the sessions collection is dropped, and re-sharded with a shard key other than _id, the balancer will end up creating invalid chunks (the _configsvrCommitChunkSplit command does not verify that the requested split points have the expected shard key pattern). This issue exists in 3.6, 4.0, 4.2 and 4.4 since prior to&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35804&quot; title=&quot;Disallow dropping collections under config/admin via mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35804&quot;&gt;&lt;del&gt;SERVER-35804&lt;/del&gt;&lt;/a&gt;&#160;users are not banned from dropping collections in the config database.&lt;/p&gt;

&lt;p&gt;We can solve this by doing one of the following:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Backport&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-35804&quot; title=&quot;Disallow dropping collections under config/admin via mongos&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-35804&quot;&gt;&lt;del&gt;SERVER-35804&lt;/del&gt;&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;Make&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/5c16643eadef9d516c1c5286a3c7cd28b52c03cb/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp#L223&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;getSplitCandidatesForSessionsCollection()&lt;/a&gt;&#160;not return any candidate chunks or throw an error if the shard key for config.system.sessions collection is not _id.&#160;&lt;/li&gt;
	&lt;li&gt;Make the _configCommitChunkSplit command validate that the split points have the expected key pattern (currently, it only verifies that the split points&#160;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/c90f38192378c8526354465991830524eda90c1f/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp#L563-L568&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;came in increasing order and that are not repeated&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="1798958">SERVER-58104</key>
            <summary>config.system.sessions collection can end up with invalid chunks if it is dropped and re-sharded with a shard key other than _id</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="13201">Fixed</resolution>
                                        <assignee username="jonathan.lee@mongodb.com">Jonathan Lee</assignee>
                                    <reporter username="cheahuychou.mao@mongodb.com">Cheahuychou Mao</reporter>
                        <labels>
                            <label>sharding-wfbf-day</label>
                    </labels>
                <created>Fri, 25 Jun 2021 21:57:59 +0000</created>
                <updated>Sun, 29 Oct 2023 21:51:36 +0000</updated>
                            <resolved>Fri, 8 Oct 2021 14:03:22 +0000</resolved>
                                                    <fixVersion>3.6 Required</fixVersion>
                    <fixVersion>4.2.18</fixVersion>
                    <fixVersion>4.0.28</fixVersion>
                    <fixVersion>4.4.10</fixVersion>
                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="4111722" author="xgen-internal-githook" created="Thu, 7 Oct 2021 22:06:00 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jonathan Lee&apos;, &apos;email&apos;: &apos;jonathan.lee@mongodb.com&apos;, &apos;username&apos;: &apos;jonatlee&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58104&quot; title=&quot;config.system.sessions collection can end up with invalid chunks if it is dropped and re-sharded with a shard key other than _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58104&quot;&gt;&lt;del&gt;SERVER-58104&lt;/del&gt;&lt;/a&gt; Prevent the balancer from calculating split points in sessions collection if shard key is not _id&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 9a12a55346e0da77acc94797bf5a558b001188e0)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/db0d66c2fe43edffeb3aa72f6f51aa23e5882036&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/db0d66c2fe43edffeb3aa72f6f51aa23e5882036&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4110107" author="xgen-internal-githook" created="Thu, 7 Oct 2021 13:48:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jonathan Lee&apos;, &apos;email&apos;: &apos;jonathan.lee@mongodb.com&apos;, &apos;username&apos;: &apos;jonatlee&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58104&quot; title=&quot;config.system.sessions collection can end up with invalid chunks if it is dropped and re-sharded with a shard key other than _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58104&quot;&gt;&lt;del&gt;SERVER-58104&lt;/del&gt;&lt;/a&gt; Prevent the balancer from calculating split points in sessions collection if shard key is not _id&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit 01549c7e5d425f48c5c9533d2655e20d992d9eef.&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/932f1c7180a0bdae321bdccefaecb2bf15053761&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/932f1c7180a0bdae321bdccefaecb2bf15053761&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4105398" author="xgen-internal-githook" created="Wed, 6 Oct 2021 14:44:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jonathan Lee&apos;, &apos;email&apos;: &apos;jonathan.lee@mongodb.com&apos;, &apos;username&apos;: &apos;jonatlee&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58104&quot; title=&quot;config.system.sessions collection can end up with invalid chunks if it is dropped and re-sharded with a shard key other than _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58104&quot;&gt;&lt;del&gt;SERVER-58104&lt;/del&gt;&lt;/a&gt; Prevent the balancer from calculating split points in sessions collection if shard key is not _id&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 9a12a55346e0da77acc94797bf5a558b001188e0)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/01549c7e5d425f48c5c9533d2655e20d992d9eef&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/01549c7e5d425f48c5c9533d2655e20d992d9eef&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4069561" author="xgen-internal-githook" created="Fri, 17 Sep 2021 20:44:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jonathan Lee&apos;, &apos;email&apos;: &apos;jonathan.lee@mongodb.com&apos;, &apos;username&apos;: &apos;jonatlee&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58104&quot; title=&quot;config.system.sessions collection can end up with invalid chunks if it is dropped and re-sharded with a shard key other than _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58104&quot;&gt;&lt;del&gt;SERVER-58104&lt;/del&gt;&lt;/a&gt; Prevent the balancer from calculating split points in sessions collection if shard key is not _id&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 9a12a55346e0da77acc94797bf5a558b001188e0)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ea6a39b5dce5b3f1a34a3259f3c8534a218ccff1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ea6a39b5dce5b3f1a34a3259f3c8534a218ccff1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4068968" author="xgen-internal-githook" created="Fri, 17 Sep 2021 16:29:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jonathan Lee&apos;, &apos;email&apos;: &apos;jonathan.lee@mongodb.com&apos;, &apos;username&apos;: &apos;jonatlee&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-58104&quot; title=&quot;config.system.sessions collection can end up with invalid chunks if it is dropped and re-sharded with a shard key other than _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-58104&quot;&gt;&lt;del&gt;SERVER-58104&lt;/del&gt;&lt;/a&gt; Prevent the balancer from calculating split points in sessions collection if shard key is not _id&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9a12a55346e0da77acc94797bf5a558b001188e0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9a12a55346e0da77acc94797bf5a558b001188e0&lt;/a&gt;&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="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </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>3.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="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>Wed, 15 Sep 2021 21:23:20 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 17 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_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_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, 17 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>85.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>cheahuychou.mao@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jonathan.lee@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzovmn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hz9c0f:</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="5221">Sharding 2021-09-20</customfieldvalue>
    <customfieldvalue id="5222">Sharding 2021-10-04</customfieldvalue>
    <customfieldvalue id="5223">Sharding 2021-10-18</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|hzohvr:</customfieldvalue>

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