<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:39:23 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-15912] Unable to restore dumped collection </title>
                <link>https://jira.mongodb.org/browse/SERVER-15912</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We have the following problem:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Mongo cluster consists of 6 shards deployed to AWS EC2&lt;/li&gt;
	&lt;li&gt;One of the collections started to behave very slow for the aggregation queries. We added appropriate indexes, but it continued to be messed up&lt;/li&gt;
	&lt;li&gt;We wanted to dump it and restore in the local environment to test our approach&lt;/li&gt;
	&lt;li&gt;Dump worked, but restore fails - so we are stuck&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Error stack trace looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;2014-11-01T19:14:42.037-0700 		Progress: 2821305158/3003237478	93%	(bytes)&lt;br/&gt;
2014-11-01T19:14:45.002-0700 		Progress: 2850985158/3003237478	94%	(bytes)&lt;br/&gt;
2014-11-01T19:14:48.000-0700 		Progress: 2881247558/3003237478	95%	(bytes)&lt;br/&gt;
2014-11-01T19:14:51.006-0700 		Progress: 2910681158/3003237478	96%	(bytes)&lt;br/&gt;
2014-11-01T19:14:54.032-0700 		Progress: 2939801158/3003237478	97%	(bytes)&lt;br/&gt;
2014-11-01T19:14:57.058-0700 		Progress: 2967957958/3003237478	98%	(bytes)&lt;br/&gt;
2014-11-01T19:15:00.002-0700 		Progress: 2996383558/3003237478	99%	(bytes)&lt;br/&gt;
2014-11-01T19:15:00.747-0700 Assertion failure amt == (size_t)( size - 4 ) src/mongo/tools/tool.cpp 330&lt;br/&gt;
2014-11-01T19:15:00.765-0700 0x1006b822b 0x100670e12 0x100661a92 0x100657d10 0x10000a187 0x10000ccf7 0x10000c7a1 0x10000c7a1 0x10000c7a1 0x10000f7fc 0x100657621 0x1006596cd 0x1006599d2 0x100000df4&lt;br/&gt;
 0   mongorestore                        0x00000001006b822b _ZN5mongo15printStackTraceERSo + 43&lt;br/&gt;
 1   mongorestore                        0x0000000100670e12 _ZN5mongo10logContextEPKc + 114&lt;br/&gt;
 2   mongorestore                        0x0000000100661a92 _ZN5mongo12verifyFailedEPKcS1_j + 274&lt;br/&gt;
 3   mongorestore                        0x0000000100657d10 _ZN5mongo8BSONTool11processFileERKN5boost11filesystem34pathE + 1450&lt;br/&gt;
 4   mongorestore                        0x000000010000a187 _ZN7Restore22processFileAndMetadataERKN5boost11filesystem34pathERKSs + 4191&lt;br/&gt;
 5   mongorestore                        0x000000010000ccf7 _ZN7Restore9drillDownEN5boost11filesystem34pathEbbbb + 3109&lt;br/&gt;
 6   mongorestore                        0x000000010000c7a1 _ZN7Restore9drillDownEN5boost11filesystem34pathEbbbb + 1743&lt;br/&gt;
 7   mongorestore                        0x000000010000c7a1 _ZN7Restore9drillDownEN5boost11filesystem34pathEbbbb + 1743&lt;br/&gt;
 8   mongorestore                        0x000000010000c7a1 _ZN7Restore9drillDownEN5boost11filesystem34pathEbbbb + 1743&lt;br/&gt;
 9   mongorestore                        0x000000010000f7fc _ZN7Restore5doRunEv + 10140&lt;br/&gt;
 10  mongorestore                        0x0000000100657621 _ZN5mongo8BSONTool3runEv + 165&lt;br/&gt;
 11  mongorestore                        0x00000001006596cd &lt;em&gt;ZN5mongo4Tool4mainEiPPcS2&lt;/em&gt; + 1437&lt;br/&gt;
 12  mongorestore                        0x00000001006599d2 main + 66&lt;br/&gt;
 13  mongorestore                        0x0000000100000df4 start + 52&lt;br/&gt;
assertion: 0 assertion src/mongo/tools/tool.cpp:330&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;We can provide actual dump file upon request - it&apos;s 865MB&lt;/p&gt;</description>
                <environment></environment>
        <key id="166864">SERVER-15912</key>
            <summary>Unable to restore dumped collection </summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="ramon.fernandez@mongodb.com">Ramon Fernandez Marina</assignee>
                                    <reporter username="paulgpa">Pavlo Grinchenko</reporter>
                        <labels>
                    </labels>
                <created>Sun, 2 Nov 2014 02:28:34 +0000</created>
                <updated>Wed, 12 Nov 2014 22:16:18 +0000</updated>
                            <resolved>Wed, 12 Nov 2014 22:16:18 +0000</resolved>
                                    <version>2.6.5</version>
                                                    <component>Tools</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="762866" author="ramon.fernandez" created="Wed, 12 Nov 2014 22:16:03 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=paulgpa&quot; class=&quot;user-hover&quot; rel=&quot;paulgpa&quot;&gt;paulgpa&lt;/a&gt;, glad to hear you found the root cause of the issue. In its defense, &lt;tt&gt;mongorestore&lt;/tt&gt; does flag the corruption and aborts, although I would agree it doesn&apos;t do this in a very friendly manner.&lt;/p&gt;

&lt;p&gt;Thanks for keeping us posted, closing this ticket now.&lt;/p&gt;</comment>
                            <comment id="762850" author="paulgpa" created="Wed, 12 Nov 2014 22:02:43 +0000"  >&lt;p&gt;OK - I think we found the source of the issue.&lt;/p&gt;

&lt;p&gt;On a Mac by default TGZ files are unpacked with Unarchiver tool. On the dump archive it failed and extracted file partially. Unfortunately your mongorestore tool doesn&apos;t message corruption properly. We used command line unarchive approach and it was restored properly.&lt;/p&gt;

&lt;p&gt;Sorry for confusion, but the issue is on my side, but not yours. Please close this one.&lt;/p&gt;</comment>
                            <comment id="762030" author="paulgpa" created="Wed, 12 Nov 2014 07:22:29 +0000"  >&lt;p&gt;I tried to restore this data dump using 2.6.5 tools and got the same issue:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;2014-11-11T23:05:24.489-0800 Assertion failure amt == (size_t)( size - 4 ) src/mongo/tools/tool.cpp 330&lt;br/&gt;
2014-11-11T23:05:24.509-0800 0x1006ba3cb 0x100672fb2 0x100663c32 0x100659eb0 0x10000a5e7 0x10000d157 0x10000cc01 0x10000cc01 0x10000fc5c 0x1006597c1 0x10065b86d 0x10065bb72 0x100001254&lt;br/&gt;
 0   mongorestore                        0x00000001006ba3cb _ZN5mongo15printStackTraceERSo + 43&lt;br/&gt;
 1   mongorestore                        0x0000000100672fb2 _ZN5mongo10logContextEPKc + 114&lt;br/&gt;
 2   mongorestore                        0x0000000100663c32 _ZN5mongo12verifyFailedEPKcS1_j + 274&lt;br/&gt;
 3   mongorestore                        0x0000000100659eb0 _ZN5mongo8BSONTool11processFileERKN5boost11filesystem34pathE + 1450&lt;br/&gt;
 4   mongorestore                        0x000000010000a5e7 _ZN7Restore22processFileAndMetadataERKN5boost11filesystem34pathERKSs + 4191&lt;br/&gt;
 5   mongorestore                        0x000000010000d157 _ZN7Restore9drillDownEN5boost11filesystem34pathEbbbb + 3109&lt;br/&gt;
 6   mongorestore                        0x000000010000cc01 _ZN7Restore9drillDownEN5boost11filesystem34pathEbbbb + 1743&lt;br/&gt;
 7   mongorestore                        0x000000010000cc01 _ZN7Restore9drillDownEN5boost11filesystem34pathEbbbb + 1743&lt;br/&gt;
 8   mongorestore                        0x000000010000fc5c _ZN7Restore5doRunEv + 10140&lt;br/&gt;
 9   mongorestore                        0x00000001006597c1 _ZN5mongo8BSONTool3runEv + 165&lt;br/&gt;
 10  mongorestore                        0x000000010065b86d &lt;em&gt;ZN5mongo4Tool4mainEiPPcS2&lt;/em&gt; + 1437&lt;br/&gt;
 11  mongorestore                        0x000000010065bb72 main + 66&lt;br/&gt;
 12  mongorestore                        0x0000000100001254 start + 52&lt;br/&gt;
assertion: 0 assertion src/mongo/tools/tool.cpp:330&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="758302" author="ramon.fernandez" created="Thu, 6 Nov 2014 22:09:54 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=paulgpa&quot; class=&quot;user-hover&quot; rel=&quot;paulgpa&quot;&gt;paulgpa&lt;/a&gt;, we&apos;ll let you know what we find.&lt;/p&gt;</comment>
                            <comment id="757478" author="paulgpa" created="Thu, 6 Nov 2014 02:44:51 +0000"  >&lt;p&gt;Ramon - we uploaded data dump.&lt;/p&gt;</comment>
                            <comment id="756006" author="paulgpa" created="Tue, 4 Nov 2014 20:22:59 +0000"  >&lt;p&gt;Thanks for the follow-up Ramon. &lt;/p&gt;

&lt;p&gt;1) I will upload the dump file as soon as I can. I will work with my operations team to do this. Unfortunately I am on the road this week and doubt that hotel&apos;s connection will allow me to do this efficiently.&lt;/p&gt;

&lt;p&gt;2) Our configuration: 6 shards - each represented by the replica set with 3 nodes. Fairly standard configuration.&lt;/p&gt;</comment>
                            <comment id="755956" author="ramon.fernandez" created="Tue, 4 Nov 2014 19:49:53 +0000"  >&lt;p&gt;Thanks for the additional information &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=paulgpa&quot; class=&quot;user-hover&quot; rel=&quot;paulgpa&quot;&gt;paulgpa&lt;/a&gt;. Can you please upload your dump file so we can examine it? Here&apos;s how:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;scp -P 722 -r &amp;lt;dumpfile&amp;gt; SERVER-15912@www.mongodb.com:&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;where &lt;tt&gt;&amp;lt;dumpfile&amp;gt;&lt;/tt&gt; is the dump file produced by &lt;tt&gt;mongodump&lt;/tt&gt;. When prompted for a password just hit enter.&lt;/p&gt;

&lt;p&gt;Also you say you have six shards, are these stand-alone or replica sets? If the latter, are you taking the dump from the primary? Can you please include the command line(s) you used to produce the dumpfile?&lt;/p&gt;

&lt;p&gt;Thanks for offering to try the new tools, that should provide useful information on our effort to troubleshoot this ticket.&lt;/p&gt;</comment>
                            <comment id="755885" author="paulgpa" created="Tue, 4 Nov 2014 18:56:06 +0000"  >&lt;p&gt;Ramon&lt;/p&gt;

&lt;p&gt;Thanks a lot for your suggestion. This is a completely repeatable problem. We reproduced it 2 times with different operations team members. We will try your 2.7.7/2.7.8 tools proposal. Do you think it will work properly with a sharded environment that&apos;s on 2.6.5?&lt;/p&gt;</comment>
                            <comment id="755006" author="ramon.fernandez" created="Mon, 3 Nov 2014 20:33:56 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=paulgpa&quot; class=&quot;user-hover&quot; rel=&quot;paulgpa&quot;&gt;paulgpa&lt;/a&gt;, note that the MongoDB tools have been entirely re-written for the 2.7.7 development release, so if a new dump+restore cycle shows the same problem I&apos;d recommend you try with the new tools, which can be &lt;a href=&quot;http://www.mongodb.org/downloads&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;downloaded as part of the 2.7.7/2.7.8 development releases&lt;/a&gt; or &lt;a href=&quot;https://github.com/mongodb/mongo-tools&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;cloned from github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If the new tools also show the issue please let us know, and I&apos;ll send you instructions to upload the dump file.&lt;/p&gt;</comment>
                            <comment id="754853" author="ramon.fernandez" created="Mon, 3 Nov 2014 18:49:15 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=paulgpa&quot; class=&quot;user-hover&quot; rel=&quot;paulgpa&quot;&gt;paulgpa&lt;/a&gt;, is this a repeatable problem? Can you re-dump the collection? The error you&apos;re seeing could indicate data corruption on the dump file, so I&apos;d recommend you try to re-dump the collection to a new dump file while checking the OS logs for possible disk-related errors. If no disk errors appear, the dump succeeds but the restore fails again, there may be a bug in mongodump/restore that would need investigation.&lt;/p&gt;</comment>
                            <comment id="754779" author="paulgpa" created="Mon, 3 Nov 2014 17:58:41 +0000"  >&lt;blockquote&gt;
&lt;p&gt;&amp;gt; mongorestore --version&lt;br/&gt;
 version 2.6.4&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I will upgrade to the latest one and try again&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>11.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 3 Nov 2014 18:49:15 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 14 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_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 14 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>paulgpa</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlk9j:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>145798</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1) Dump collection&lt;br/&gt;
2) Try to mongorestore it - see stack trace&lt;/p&gt;</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|hs9xdj:</customfieldvalue>

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