<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:35:10 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-33973] Force cleanup of possibly remaining partial data (from failed collection/database drop) when rerunning dropCollection command</title>
                <link>https://jira.mongodb.org/browse/SERVER-33973</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As described in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-17397&quot; title=&quot;Dropping a Database or Collection in a Sharded Cluster may not fully succeed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-17397&quot;&gt;&lt;del&gt;SERVER-17397&lt;/del&gt;&lt;/a&gt;, with the way sharded collection/database create and drop are implemented currently, it is possible that a failed create or drop operation might leave around partial information such as incomplete chunks or collection entries. This forces administrators to do manual cleanup and poses the risk of corrupting data due to human error.&lt;/p&gt;

&lt;p&gt;We should implement `cleanupOrphanedCollection`/`cleanupOrphanedDatabase` commands, which perform this cleanup and do proper checking and synchronization.&lt;/p&gt;

&lt;p&gt;The code for these manual commands will eventually become the basis for implementing consistent drops using a resumable task queue.&lt;/p&gt;</description>
                <environment></environment>
        <key id="513380">SERVER-33973</key>
            <summary>Force cleanup of possibly remaining partial data (from failed collection/database drop) when rerunning dropCollection command</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="blake.oler@mongodb.com">Blake Oler</assignee>
                                    <reporter username="kaloian.manassiev@mongodb.com">Kaloian Manassiev</reporter>
                        <labels>
                            <label>ShardingAutomationSupport</label>
                            <label>former-quick-wins</label>
                            <label>gm-ack</label>
                    </labels>
                <created>Mon, 19 Mar 2018 14:19:02 +0000</created>
                <updated>Sun, 29 Oct 2023 22:33:36 +0000</updated>
                            <resolved>Thu, 1 Aug 2019 18:08:57 +0000</resolved>
                                                    <fixVersion>4.2.1</fixVersion>
                    <fixVersion>4.3.1</fixVersion>
                                    <component>Sharding</component>
                                        <votes>5</votes>
                                    <watches>19</watches>
                                                                                                                <comments>
                            <comment id="2386756" author="blake.oler" created="Mon, 26 Aug 2019 15:43:45 +0000"  >&lt;p&gt;Requesting backport to v3.6 as part of the solution for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34760&quot; title=&quot;Retries of _configsvrShardCollection may not send setShardVersion to primary shard&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34760&quot;&gt;&lt;del&gt;SERVER-34760&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2373965" author="xgen-internal-githook" created="Thu, 15 Aug 2019 18:30:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Blake Oler&apos;, &apos;email&apos;: &apos;blake.oler@mongodb.com&apos;, &apos;username&apos;: &apos;BlakeIsBlake&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33973&quot; title=&quot;Force cleanup of possibly remaining partial data (from failed collection/database drop) when rerunning dropCollection command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33973&quot;&gt;&lt;del&gt;SERVER-33973&lt;/del&gt;&lt;/a&gt; Force cleanup of possibly remaining partial data after failed collection/database drop&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 5c13fd19fab91e0aca666269129c51edab3380e2)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/cfed6ca4b485f054ee68db3a6eb948e585f128e4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/cfed6ca4b485f054ee68db3a6eb948e585f128e4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2354708" author="xgen-internal-githook" created="Thu, 1 Aug 2019 18:07:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Blake Oler&apos;, &apos;username&apos;: &apos;BlakeIsBlake&apos;, &apos;email&apos;: &apos;blake.oler@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-33973&quot; title=&quot;Force cleanup of possibly remaining partial data (from failed collection/database drop) when rerunning dropCollection command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-33973&quot;&gt;&lt;del&gt;SERVER-33973&lt;/del&gt;&lt;/a&gt; Force cleanup of possibly remaining partial data after failed collection/database drop&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/5c13fd19fab91e0aca666269129c51edab3380e2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/5c13fd19fab91e0aca666269129c51edab3380e2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2310074" author="blake.oler" created="Tue, 2 Jul 2019 18:44:59 +0000"  >&lt;p&gt;Ran into issues with the new &lt;tt&gt;dropCollection&lt;/tt&gt; approach not working with the kill_aggregation and kill_rooted_or FSM workloads. A solution will be to allow dropCollection on the config server to pass up shard error codes. Running this by the downstream-changes email list.&lt;/p&gt;</comment>
                            <comment id="1943254" author="kaloian.manassiev" created="Tue, 10 Jul 2018 15:58:45 +0000"  >&lt;p&gt;Instead of implementing a &lt;b&gt;cleanupOrphanedCollection&lt;/b&gt; command, I would instead prefer that we tighten the &lt;b&gt;dropCollection&lt;/b&gt; command to always try to perform a full cleanup. This would make the command slower for the unsharded case, but it is guaranteed that it will always make forward progress and there will not be a need to introduce a separate &quot;cleanup&quot; command.&lt;/p&gt;

&lt;p&gt;The way it would work is:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Take the collection distributed lock in order to prevent the collection from getting created concurrently&lt;/li&gt;
	&lt;li&gt;If an entry exists in &lt;tt&gt;config.collections&lt;/tt&gt;, this means that the collection actually exists so that entry should be dropped&lt;/li&gt;
	&lt;li&gt;If an entry does not exist in &lt;tt&gt;config.collections&lt;/tt&gt;, this means that the collection must have been dropped and the cleanup may need to purge the following entries:
	&lt;ul&gt;
		&lt;li&gt;All entries for the namespace in &lt;tt&gt;config.chunks&lt;/tt&gt;&lt;/li&gt;
		&lt;li&gt;All entries for the namespace in &lt;tt&gt;config.tags&lt;/tt&gt;&lt;/li&gt;
		&lt;li&gt;Broadcast dropCollection to all shards&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alyson.cabral&quot; class=&quot;user-hover&quot; rel=&quot;alyson.cabral&quot;&gt;alyson.cabral&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=schwerin&quot; class=&quot;user-hover&quot; rel=&quot;schwerin&quot;&gt;schwerin&lt;/a&gt; - what are your thoughts about the customer impact of making the dropCollection operation in sharded clusters slower? I suspect that this will impact the cases where customers drop and create collections frequently, but since it is only the drop which will be slower, it would only matter if they recreate a collection with the same name.&lt;/p&gt;</comment>
                            <comment id="1838455" author="esha.maharishi@10gen.com" created="Mon, 19 Mar 2018 16:18:04 +0000"  >&lt;p&gt;Nice! &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/biggrin.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&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="806330">SERVER-41813</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="183584">SERVER-17243</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="236554">SERVER-21179</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="43961">SERVER-6413</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="186484">SERVER-17397</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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000dAa9tQAC, 500A000000ZgTqQIAV]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 19 Mar 2018 16:18:04 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 24 weeks, 2 days 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-41813'>SERVER-41813</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_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Currently, if we drop a sharded collection, and that drop _fails_ on any of the shards, the error bubbled up will be changed to {{OperationFailed}}. I&amp;#39;m changing the behavior to instead return the first shard&amp;#39;s error code.</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16942"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1336</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>
                            4 years, 24 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>blake.oler@mongodb.com</customfieldvalue>
            <customfieldvalue>esha.maharishi@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kaloian.manassiev@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htt0c7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hukdy7:</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="2917">Sharding 2019-05-06</customfieldvalue>
    <customfieldvalue id="3002">Sharding 2019-06-17</customfieldvalue>
    <customfieldvalue id="3061">Sharding 2019-07-15</customfieldvalue>
    <customfieldvalue id="3062">Sharding 2019-07-29</customfieldvalue>
    <customfieldvalue id="3164">Sharding 2019-08-12</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_17051" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Teams Impacted</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16943"><![CDATA[Cloud]]></customfieldvalue>
    <customfieldvalue key="16945"><![CDATA[Drivers]]></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|htsmjj:</customfieldvalue>

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