<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:37:19 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-15213] MongoS concurrency problem with dropDatabase</title>
                <link>https://jira.mongodb.org/browse/SERVER-15213</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When an unsharded database is re-created after a &quot;dropDatabase&quot; command has been used, and it happens to be located on a different shard as a result, only the initiating mongos of the drop observes the subsequent re-creation - all others continue to route as they did before.&lt;/p&gt;

&lt;p&gt;This leads to the same problems observed with movePrimary, other mongos will populate &amp;amp; query, what is now, the wrong shard.&lt;/p&gt;

&lt;p&gt;This is essentially a different way to invoke the movePrimary command, with similar results, and thus requires that all &lt;b&gt;other&lt;/b&gt; mongos be restarted or flushed to function correctly.&lt;/p&gt;

&lt;p&gt;This seems like an unreasonable requirement for dropDatabase to be burdened with, given it is considerably more common than movePrimary.&lt;/p&gt;</description>
                <environment></environment>
        <key id="157593">SERVER-15213</key>
            <summary>MongoS concurrency problem with dropDatabase</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="andrew.ryder@mongodb.com">Andrew Ryder</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Sep 2014 06:33:19 +0000</created>
                <updated>Thu, 5 Dec 2019 22:52:46 +0000</updated>
                            <resolved>Thu, 11 Sep 2014 19:35:42 +0000</resolved>
                                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="1359257" author="andrew.ryder@10gen.com" created="Wed, 17 Aug 2016 06:40:33 +0000"  >&lt;p&gt;Hi Jason!&lt;/p&gt;

&lt;p&gt;Greg is not available but I can attempt to address your concerns in his place.&lt;/p&gt;

&lt;p&gt;We broadly agree with your definition of unsharded database. We can work with that nomenclature.&lt;/p&gt;

&lt;p&gt;To your other point:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;gt; The workarounds include ... sharding collections on creation but disabling balancing per-collection.&lt;br/&gt;
Greg, are you saying that if one were to shard all collections on a database, then invoke dropDatabase, that one would not need to flush the mongos config, that somehow because all of the collections were sharded that the dropDatabase operation gets tracked by all the mongos instances with references to that database?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Yes. But be aware the workaround only applies if you shard every collection on creation (and optionally disable balancing to prevent any migration) before and after the dropDatabase operation (or movePrimary). This works because sharded collections are versioned, where-as nothing else is. The fundamental issue with unsharded collections is that there is no version number by which a MongoS can detect that something has changed.&lt;/p&gt;

&lt;p&gt;I hope this helps.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Andrew&lt;/p&gt;</comment>
                            <comment id="1349368" author="jason.coombs@yougov.com" created="Sat, 6 Aug 2016 16:30:40 +0000"  >&lt;p&gt;&amp;gt; There&apos;s no concept really of an &quot;unsharded database&quot;&lt;/p&gt;

&lt;p&gt;I would say that any database for which `enableSharding` has not been invoked would be an unsharded database. I might also include any database which has no sharded collections.&lt;/p&gt;

&lt;p&gt;&amp;gt; The workarounds include ... sharding collections on creation but disabling balancing per-collection.&lt;/p&gt;

&lt;p&gt;Greg, are you saying that if one were to shard all collections on a database, then invoke dropDatabase, that one would not need to flush the mongos config, that somehow because all of the collections were sharded that the dropDatabase operation gets tracked by all the mongos instances with references to that database?&lt;/p&gt;</comment>
                            <comment id="717013" author="greg_10gen" created="Thu, 11 Sep 2014 19:34:29 +0000"  >&lt;p&gt;&amp;gt; When an unsharded database is re-created after a &quot;dropDatabase&quot; command has been used&lt;br/&gt;
There&apos;s no concept really of an &quot;unsharded database&quot;, but this definitely occurs with unsharded collections in that database.  The &quot;enableSharding&quot; flag just allows sharded collections to be created - it may go away in the future.&lt;/p&gt;

&lt;p&gt;The core issue is that unsharded collections need to be versioned and currently any movement, implicit or explicit, of an unsharded collection between shards is not tracked.  This issue is &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-939&quot; title=&quot;Ability to distribute collections in a single db&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-939&quot;&gt;SERVER-939&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The workarounds include app-enforced downtime for these collections and explicitly flushing mongos config (flushRouterConfig) after operations of this type, or sharding collections on creation but disabling balancing per-collection.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="10661">SERVER-939</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="24667">SERVER-4232</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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000iQAWfQAO]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 11 Sep 2014 13:00:13 +0000</customfieldvalue>

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


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 26 weeks ago
                        </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>andrew.ryder@mongodb.com</customfieldvalue>
            <customfieldvalue>greg_10gen</customfieldvalue>
            <customfieldvalue>jason.coombs@yougov.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlo7j:</customfieldvalue>

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

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

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