<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:23:44 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-10662] Sharding stopped working on a collection</title>
                <link>https://jira.mongodb.org/browse/SERVER-10662</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;We experienced a problem on our Mongo Sharded Cluster.&lt;br/&gt;
We Use Mongo 2.2.3 on Linux Debian 6.0.5&lt;/p&gt;

&lt;p&gt;One of the 3 ConfigServs failed recently.&lt;br/&gt;
The server came back online few hours later.&lt;br/&gt;
On the mongoS logfile we could observe :&lt;/p&gt;

&lt;p&gt;Thu Aug 29 10:50:00 &lt;span class=&quot;error&quot;&gt;&amp;#91;CheckConfigServers&amp;#93;&lt;/span&gt; ERROR: config servers 172.16.16.1:27019 and 172.16.18.1:27019 differconfig servers 172.16.16.1:27019 and 172.16.18.1:27019 differconfig servers 172.16.16.1:27019 and 172.16.18.1:27019 differconfig servers 172.16.16.1:27019 and 172.16.18.1:27019 differconfig servers not in sync! config servers 172.16.16.1:27019 and 172.16.18.1:27019 differ&lt;/p&gt;


&lt;p&gt;To recover from this state we did :&lt;/p&gt;


&lt;p&gt;1) Disabled the Balancer with :&lt;br/&gt;
sh.setBalancerState(false)&lt;/p&gt;

&lt;p&gt;2) Stopped the mongodb-conf daemon from the failed-server (server1) and from a second server (We let the third server and it ConfigServ running).&lt;/p&gt;

&lt;p&gt;3) Rsynced configdb datas from the server2 to the server1&lt;/p&gt;

&lt;p&gt;4) Re-Started mongodb-conf daemon from server2 : ok&lt;/p&gt;

&lt;p&gt;5) Re-Started mongodb-conf daemon from server1 : ok&lt;/p&gt;

&lt;p&gt;6) Enabled again the Balancer with :&lt;/p&gt;

&lt;p&gt;sh.setBalancerState(true)&lt;/p&gt;



&lt;p&gt;Everything seemed ok, but now we could see in logs this issue :&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Balancer&amp;#93;&lt;/span&gt; caught exception while doing balance: not sharded:rawlogs.raw_log&lt;/p&gt;



&lt;p&gt;Collections seems to be present but sharding is not ok :&lt;/p&gt;


&lt;p&gt;mongos&amp;gt; db.collections.find()&lt;br/&gt;
{ &quot;_id&quot; : &quot;rawlogs.raw_log&quot;, &quot;lastmod&quot; : ISODate(&quot;1970-01-16T19:08:22.332Z&quot;), &quot;dropped&quot; : false, &quot;key&quot; : &lt;/p&gt;
{ &quot;_id&quot; : 1 }
&lt;p&gt;, &quot;unique&quot; : false, &quot;lastmodEpoch&quot; : ObjectId(&quot;515a78325c52d82fad24aa03&quot;) }&lt;br/&gt;
{ &quot;_id&quot; : &quot;rawlogs.raw_log_ghost&quot;, &quot;lastmod&quot; : ISODate(&quot;1970-01-16T22:04:08.874Z&quot;), &quot;dropped&quot; : false, &quot;key&quot; : &lt;/p&gt;
{ &quot;_id&quot; : 1 }
&lt;p&gt;, &quot;unique&quot; : false, &quot;lastmodEpoch&quot; : ObjectId(&quot;51fbaf295c52d82fad24eccb&quot;) }&lt;br/&gt;
mongos&amp;gt;&lt;/p&gt;



&lt;p&gt;mongos&amp;gt; db.raw_log.stats()&lt;br/&gt;
{&lt;br/&gt;
    &quot;sharded&quot; : false,&lt;br/&gt;
    &quot;primary&quot; : &quot;shard1&quot;,&lt;br/&gt;
    &quot;ns&quot; : &quot;rawlogs.raw_log&quot;,&lt;br/&gt;
    &quot;count&quot; : 2380607210,&lt;br/&gt;
    &quot;size&quot; : 1044708269072,&lt;br/&gt;
    &quot;avgObjSize&quot; : 438.84109259334724,&lt;br/&gt;
    &quot;storageSize&quot; : NumberLong(&quot;1116861681584&quot;),&lt;br/&gt;
    &quot;numExtents&quot; : 541,&lt;br/&gt;
    &quot;nindexes&quot; : 1,&lt;br/&gt;
    &quot;lastExtentSize&quot; : 2146426864,&lt;br/&gt;
    &quot;paddingFactor&quot; : 1,&lt;br/&gt;
    &quot;systemFlags&quot; : 1,&lt;br/&gt;
    &quot;userFlags&quot; : 0,&lt;br/&gt;
    &quot;totalIndexSize&quot; : 80006256176,&lt;br/&gt;
    &quot;indexSizes&quot; : &lt;/p&gt;
{
        &quot;_id_&quot; : 80006256176
    }
&lt;p&gt;,&lt;br/&gt;
    &quot;ok&quot; : 1&lt;br/&gt;
}&lt;br/&gt;
mongos&amp;gt;&lt;/p&gt;




&lt;p&gt;But apparently the config of the sharding is set (like it was)&lt;/p&gt;


&lt;p&gt;mongos&amp;gt; sh.status()&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;shard1&quot;,  &quot;host&quot; : &quot;shard1/172.16.19.1:27018,172.16.19.2:27018&quot; }
    {  &quot;_id&quot; : &quot;shard2&quot;,  &quot;host&quot; : &quot;shard2/172.16.19.3:27018,172.16.19.4:27018&quot; }
    {  &quot;_id&quot; : &quot;shard3&quot;,  &quot;host&quot; : &quot;shard3/172.16.19.5:27018,172.16.19.6:27018&quot; }
    {  &quot;_id&quot; : &quot;shard4&quot;,  &quot;host&quot; : &quot;shard4/172.16.19.7:27018,172.16.19.8:27018&quot; }
    {  &quot;_id&quot; : &quot;shard5&quot;,  &quot;host&quot; : &quot;shard5/172.16.19.10:27018,172.16.19.9:27018&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;rawlogs&quot;,  &quot;partitioned&quot; : true,  &quot;primary&quot; : &quot;shard1&quot; }
&lt;p&gt;        rawlogs.raw_log chunks:&lt;br/&gt;
                shard1    24615&lt;br/&gt;
                shard2    8279&lt;br/&gt;
                shard3    3314&lt;br/&gt;
                shard4    3498&lt;br/&gt;
                shard5    10263&lt;br/&gt;
            too many chunks to print, use verbose if you want to force print&lt;br/&gt;
        rawlogs.raw_log_ghost chunks:&lt;br/&gt;
                shard1    368&lt;br/&gt;
                shard3    277&lt;br/&gt;
                shard2    277&lt;br/&gt;
                shard4    414&lt;br/&gt;
                shard5    1162&lt;br/&gt;
            too many chunks to print, use verbose if you want to force print&lt;/p&gt;
    {  &quot;_id&quot; : &quot;tempstats&quot;,  &quot;partitioned&quot; : false,  &quot;primary&quot; : &quot;shard1&quot; }
    {  &quot;_id&quot; : &quot;test&quot;,  &quot;partitioned&quot; : false,  &quot;primary&quot; : &quot;shard3&quot; }
    {  &quot;_id&quot; : &quot;stats&quot;,  &quot;partitioned&quot; : false,  &quot;primary&quot; : &quot;shard5&quot; }
    {  &quot;_id&quot; : &quot;rawlog&quot;,  &quot;partitioned&quot; : false,  &quot;primary&quot; : &quot;shard5&quot; }

&lt;p&gt;mongos&amp;gt;&lt;/p&gt;


&lt;p&gt;We also tryied to retry the procedure (recovery of Configserv1 from configServ2) with mongoS stopped.&lt;br/&gt;
We haven&apos;t had much success but in the logs when we restarted the mongoS and re-enabled the balancer we could see in logs :&lt;/p&gt;


&lt;p&gt;Fri Aug 30 10:11:36 &lt;span class=&quot;error&quot;&gt;&amp;#91;Balancer&amp;#93;&lt;/span&gt; warning: got invalid chunk version 1|0||521f0c0563b2cfc94d8fad9b in document { _id: &quot;rawlogs.raw_log-_id_MinKey&quot;, lastmod: Timestamp 1000|0, lastmodEpoch: ObjectId(&apos;521f0c0563b2cfc94d8fad9b&apos;), ns: &quot;rawlogs.raw_log&quot;, min: &lt;/p&gt;
{ _id: MinKey }
&lt;p&gt;, max: &lt;/p&gt;
{ _id: BinData }
&lt;p&gt;, shard: &quot;shard1&quot; } when trying to load differing chunks at version 0|0||515a78325c52d82fad24aa03&lt;br/&gt;
Fri Aug 30 10:11:36 &lt;span class=&quot;error&quot;&gt;&amp;#91;Balancer&amp;#93;&lt;/span&gt; warning: major change in chunk information found when reloading rawlogs.raw_log, previous version was 0|0||515a78325c52d82fad24aa03&lt;br/&gt;
Fri Aug 30 10:11:36 &lt;span class=&quot;error&quot;&gt;&amp;#91;Balancer&amp;#93;&lt;/span&gt; ChunkManager: time to load chunks for rawlogs.raw_log: 48ms sequenceNumber: 2 version: 0|0||000000000000000000000000 based on: (empty)&lt;br/&gt;
Fri Aug 30 10:11:36 &lt;span class=&quot;error&quot;&gt;&amp;#91;Balancer&amp;#93;&lt;/span&gt; warning: no chunks found for collection rawlogs.raw_log, assuming unsharded&lt;br/&gt;
Fri Aug 30 10:11:36 &lt;span class=&quot;error&quot;&gt;&amp;#91;Balancer&amp;#93;&lt;/span&gt; ChunkManager: time to load chunks for rawlogs.raw_log_ghost: 31ms sequenceNumber: 3 version: 707|393||51fbaf295c52d82fad24eccb based on: (empty)&lt;br/&gt;
Fri Aug 30 10:11:36 &lt;span class=&quot;error&quot;&gt;&amp;#91;Balancer&amp;#93;&lt;/span&gt; distributed lock &apos;balancer/mycompt.local:27021:1377850265:1804289383&apos; unlocked.&lt;br/&gt;
Fri Aug 30 10:11:36 &lt;span class=&quot;error&quot;&gt;&amp;#91;Balancer&amp;#93;&lt;/span&gt; scoped connection to 172.16.16.1:27019,172.16.18.1:27019,172.16.18.2:27019 not being returned to the pool&lt;br/&gt;
Fri Aug 30 10:11:36 &lt;span class=&quot;error&quot;&gt;&amp;#91;Balancer&amp;#93;&lt;/span&gt; caught exception while doing balance: not sharded:rawlogs.raw_log&lt;/p&gt;



&lt;p&gt;We don&apos;t want the sharding to initiate &apos;from scratch&apos;&lt;br/&gt;
We&apos;d like to enable the continuity of the past state (before config server1 failed).&lt;/p&gt;


&lt;p&gt;We&apos;ve already tryied to refresh the MongoS with :&lt;br/&gt;
db.adminCommand(&lt;/p&gt;
{flushRouterConfig: 1}
&lt;p&gt;)&lt;br/&gt;
Without better result.&lt;/p&gt;

&lt;p&gt;Unfortunately we haven&apos;t preserved the contents of the crashed config server that we replaced.&lt;/p&gt;

&lt;p&gt;Any idea please to resume sharding, please ?&lt;/p&gt;</description>
                <environment>Linux debian 6.0.5</environment>
        <key id="88197">SERVER-10662</key>
            <summary>Sharding stopped working on a collection</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="4">Incomplete</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="anthony@stickyads.tv">Anthony Pastor</reporter>
                        <labels>
                            <label>crash</label>
                            <label>mongos</label>
                            <label>sharding</label>
                    </labels>
                <created>Mon, 2 Sep 2013 08:23:10 +0000</created>
                <updated>Tue, 4 Apr 2023 14:23:02 +0000</updated>
                            <resolved>Mon, 16 Dec 2013 04:22:14 +0000</resolved>
                                    <version>2.2.3</version>
                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="471016" author="stennie" created="Mon, 16 Dec 2013 04:22:14 +0000"  >&lt;p&gt;Hi Anthony,&lt;/p&gt;

&lt;p&gt;Apologies for the delayed response on this issue.  The SERVER project is only intended for reporting bugs or feature suggestions for the MongoDB server.  For MongoDB-related support discussion please post on the mongodb-user group (&lt;a href=&quot;http://groups.google.com/group/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/mongodb-user&lt;/a&gt;) or Stack Overflow / ServerFault.&lt;/p&gt;

&lt;p&gt;Given you reported this issue some time ago, I&apos;m going to assume that you have since found a solution.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Stephen&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>Mon, 16 Dec 2013 04:22:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 9 weeks, 2 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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 9 weeks, 2 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="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>anthony@stickyads.tv</customfieldvalue>
            <customfieldvalue>stephen.steneker@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmi07:</customfieldvalue>

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

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

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