<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:01: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-2834] printShardingStatus is out of date after wiping out the DB</title>
                <link>https://jira.mongodb.org/browse/SERVER-2834</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Problem:&lt;br/&gt;
printShardingStatus() prints out invalid data after a database has been removed when connecting to the mongos. e.g.&lt;/p&gt;

&lt;p&gt;&amp;gt; db.printShardingStatus()&lt;br/&gt;
&amp;#8212; Sharding Status &amp;#8212; &lt;br/&gt;
  sharding version: &lt;/p&gt;
{ &quot;_id&quot; : 1, &quot;version&quot; : 3 }
&lt;p&gt;  shards:&lt;/p&gt;
      { &quot;_id&quot; : &quot;shard0000&quot;, &quot;host&quot; : &quot;10.194.187.111:27000&quot; }
      { &quot;_id&quot; : &quot;shard0001&quot;, &quot;host&quot; : &quot;10.116.78.81:27000&quot; }
&lt;p&gt;  databases:&lt;/p&gt;
	{ &quot;_id&quot; : &quot;admin&quot;, &quot;partitioned&quot; : false, &quot;primary&quot; : &quot;config&quot; }
	{ &quot;_id&quot; : &quot;scaleout&quot;, &quot;partitioned&quot; : true, &quot;primary&quot; : &quot;shard0001&quot; }
&lt;p&gt;		scaleout.blogs chunks:&lt;br/&gt;
				shard0000	1259&lt;br/&gt;
				shard0001	1446&lt;br/&gt;
			too many chunksn to print, use verbose if you want to force print&lt;/p&gt;

&lt;p&gt;Other operations fail because of this stale data e.g. &lt;/p&gt;

&lt;p&gt;moveChunk&lt;/p&gt;

{ &quot;ok&quot; : 0, &quot;errmsg&quot; : &quot;that chunk is already on that shard&quot; }

&lt;p&gt;The config DB still see&apos;s the database and sharded collection&lt;/p&gt;

&lt;p&gt;&amp;gt; db.databases.find()&lt;/p&gt;
{ &quot;_id&quot; : &quot;admin&quot;, &quot;partitioned&quot; : false, &quot;primary&quot; : &quot;config&quot; }
{ &quot;_id&quot; : &quot;scaleout&quot;, &quot;partitioned&quot; : true, &quot;primary&quot; : &quot;shard0001&quot; }

&lt;p&gt;&amp;gt; db.chunks.find()&lt;br/&gt;
{ &quot;_id&quot; : &quot;scaleout.blogs-ts_MinKey&quot;, &quot;lastmod&quot; : &lt;/p&gt;
{ &quot;t&quot; : 180000, &quot;i&quot; : 1 }
&lt;p&gt;, &quot;ns&quot; : &quot;scaleout.blogs&quot;, &quot;min&quot; : { &quot;ts&quot; : &lt;/p&gt;
{ $minKey : 1 }
&lt;p&gt; }, &quot;max&quot; : &lt;/p&gt;
{ &quot;ts&quot; : -2147480140 }
&lt;p&gt;, &quot;shard&quot; : &quot;shard0000&quot; }&lt;br/&gt;
{ &quot;&lt;em&gt;id&quot; : &quot;scaleout.blogs-ts&lt;/em&gt;-2061389163.0&quot;, &quot;lastmod&quot; : &lt;/p&gt;
{ &quot;t&quot; : 108000, &quot;i&quot; : 1920 }
&lt;p&gt;, &quot;ns&quot; : &quot;scaleout.blogs&quot;, &quot;min&quot; : &lt;/p&gt;
{ &quot;ts&quot; : -2061389163 }
&lt;p&gt;, &quot;max&quot; : &lt;/p&gt;
{ &quot;ts&quot; : -2059556975 }
&lt;p&gt;, &quot;shard&quot; : &quot;shard0000&quot; }&lt;br/&gt;
{ &quot;&lt;em&gt;id&quot; : &quot;scaleout.blogs-ts&lt;/em&gt;-2021389163.0&quot;, &quot;lastmod&quot; : &lt;/p&gt;
{ &quot;t&quot; : 179000, &quot;i&quot; : 0 }
&lt;p&gt;, &quot;ns&quot; : &quot;scaleout.blogs&quot;, &quot;min&quot; : &lt;/p&gt;
{ &quot;ts&quot; : -2021389163 }
&lt;p&gt;, &quot;max&quot; : &lt;/p&gt;
{ &quot;ts&quot; : -2020322009 }
&lt;p&gt;, &quot;shard&quot; : &quot;shard0001&quot; }&lt;/p&gt;


&lt;p&gt;Reproduce:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;create a 2 shard system with a mongos&lt;/li&gt;
	&lt;li&gt;insert data into a collection&lt;/li&gt;
	&lt;li&gt;shard the collection&lt;/li&gt;
	&lt;li&gt;ensure that the chunks are split between shards&lt;/li&gt;
	&lt;li&gt;shutdown both shards&lt;/li&gt;
	&lt;li&gt;rm /data/db/* on both shards&lt;/li&gt;
	&lt;li&gt;startup both shards&lt;/li&gt;
	&lt;li&gt;connect to the mongos&lt;/li&gt;
	&lt;li&gt;issue a printShardingStatus or moveChunk&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Workaround:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;bounce mongos&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Business case:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;dev test / copies etc&lt;br/&gt;
Simplest way to remove a data (for example in an test automation suite) would be to remove the database files. However, because of the meta data in the config DB, the same process that is used for non-sharded systems does not work on sharded systems.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="15281">SERVER-2834</key>
            <summary>printShardingStatus is out of date after wiping out the DB</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="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="alvin">Alvin Richards</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Mar 2011 11:42:58 +0000</created>
                <updated>Tue, 12 Jul 2016 00:18:37 +0000</updated>
                            <resolved>Fri, 2 Sep 2011 05:34:54 +0000</resolved>
                                    <version>1.8.0</version>
                                                                        <votes>1</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="52151" author="eliot" created="Fri, 2 Sep 2011 05:34:55 +0000"  >&lt;p&gt;was fixed for 2.0&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 2 Sep 2011 05:34:55 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 24 weeks, 5 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_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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 24 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></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>alvin</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrp2nj:</customfieldvalue>

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

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

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