<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:40:52 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-57060] Rename of a sharded collection must bump the collection version</title>
                <link>https://jira.mongodb.org/browse/SERVER-57060</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Not bumping the collection version is a problem for scenarios like:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Creation of Collection A&lt;/li&gt;
	&lt;li&gt;Creation of Collection B&lt;/li&gt;
	&lt;li&gt;Rename of A to B, dropping target collection.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Assuming that a router saw A and B before the rename, if this router tries to refresh its routing information about B after the rename, this refresh will hang forever.&lt;/p&gt;

&lt;p&gt;The underlying problem is that since we didn&apos;t bump the collection version, the router thinks that the routing info it has about B is more recent than the one it gets from the config server.&lt;/p&gt;

&lt;p&gt;&lt;ins&gt;Solution:&lt;/ins&gt;&lt;/p&gt;

&lt;p&gt;We have to bump the collection version. The Collection Version of B after the rename should be newer than the one we had for B before the rename.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;If we take the conservative approach, this would imply modifying all entries in config.chunks for this collection + its entry on config.collections. Doing that should be enough and it will behave similarly to what we do in &lt;tt&gt;refineShardKey&lt;/tt&gt;. As a drawback we will have to update all chunks associated to the Collection which is something we tried to avoid as much as possible: that&apos;s why we replaced the namespaces by uuids, to avoid having to update all chunks.&lt;/li&gt;
	&lt;li&gt;The other approach tries to avoid having to update all docs associated to the collection on config.chunks. Since the replacement of NSS by UUID on config.chunks, we believe that there is no reason to have the epoch and the timestamp on config.chunks. Thus, if we manage to get rid of those, the rename will only have to update config.collections. In order to support backward/forward compatibility we will have to do some minor modifications to the &lt;tt&gt;setFCV&lt;/tt&gt; cmd.&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;We are going to implement the second option.  The goal of this ticket  is to add a new &lt;tt&gt;configserver&lt;/tt&gt; command that should be called when we commit the rename operation. This new command should do the &lt;a href=&quot;https://github.com/mongodb/mongo/blob/0e9bf07647879229d0852e8d8d75b0b4430fe184/src/mongo/db/s/rename_collection_coordinator.cpp#L293-L304&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;work being done&lt;/a&gt; + bumping the version (i.e. changing the timestamp and the epoch of the collection).  We should also take  the &lt;tt&gt;_kChunkOpLock&lt;/tt&gt; lock, so we disallow weirds interleavings of rename collections with merge/split chunks.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1731000">SERVER-57060</key>
            <summary>Rename of a sharded collection must bump the collection version</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="pierlauro.sciarelli@mongodb.com">Pierlauro Sciarelli</assignee>
                                    <reporter username="sergi.mateo-bellido@mongodb.com">Sergi Mateo Bellido</reporter>
                        <labels>
                            <label>PM-1965-Milestone-1</label>
                    </labels>
                <created>Wed, 19 May 2021 12:21:24 +0000</created>
                <updated>Sun, 29 Oct 2023 21:53:20 +0000</updated>
                            <resolved>Thu, 17 Jun 2021 15:01:01 +0000</resolved>
                                                    <fixVersion>5.0.0-rc3</fixVersion>
                    <fixVersion>5.1.0-rc0</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4108020" author="JIRAUSER1259052" created="Wed, 6 Oct 2021 18:54:33 +0000"  >&lt;p&gt;Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it&#8217;s been triggered. For more active release information, please keep an eye on #server-release. Thank you!&lt;/p&gt;</comment>
                            <comment id="3888211" author="xgen-internal-githook" created="Mon, 21 Jun 2021 11:20:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Pierlauro Sciarelli&apos;, &apos;email&apos;: &apos;pierlauro.sciarelli@mongodb.com&apos;, &apos;username&apos;: &apos;pierlauro&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57060&quot; title=&quot;Rename of a sharded collection must bump the collection version&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57060&quot;&gt;&lt;del&gt;SERVER-57060&lt;/del&gt;&lt;/a&gt; Rename of a sharded collection must bump the collection version&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/8cc222b80cadfec0b634a8db86e1ae1da068467b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/8cc222b80cadfec0b634a8db86e1ae1da068467b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3884875" author="xgen-internal-githook" created="Thu, 17 Jun 2021 14:58:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Pierlauro Sciarelli&apos;, &apos;email&apos;: &apos;pierlauro.sciarelli@mongodb.com&apos;, &apos;username&apos;: &apos;pierlauro&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-57060&quot; title=&quot;Rename of a sharded collection must bump the collection version&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-57060&quot;&gt;&lt;del&gt;SERVER-57060&lt;/del&gt;&lt;/a&gt; Rename of a sharded collection must bump the collection version&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f90412db3e82dd2e6d43e63a74debc99b63b96da&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f90412db3e82dd2e6d43e63a74debc99b63b96da&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>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="1764595">SERVER-57313</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1764755">SERVER-57316</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1772533">SERVER-57522</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1772590">SERVER-57523</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1772602">SERVER-57524</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1782233">SERVER-57703</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1730996">SERVER-57059</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>3.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="21777"><![CDATA[v5.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>Wed, 16 Jun 2021 06:28:48 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 18 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-57316'>SERVER-57316</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-57524'>SERVER-57524</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-57523'>SERVER-57523</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-57313'>SERVER-57313</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-57522'>SERVER-57522</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-57703'>SERVER-57703</a></s>]]></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-1965</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, 18 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>pierlauro.sciarelli@mongodb.com</customfieldvalue>
            <customfieldvalue>sergi.mateo-bellido@mongodb.com</customfieldvalue>
            <customfieldvalue>vivian.ge@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzdd0v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hyjrfz:</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="4840">Sharding EMEA 2021-05-31</customfieldvalue>
    <customfieldvalue id="4979">Sharding EMEA 2021-06-28</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|hzcz9z:</customfieldvalue>

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