<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:30:16 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-12983] Restore from 2.4 DB into 2.6 DB fails due to index?</title>
                <link>https://jira.mongodb.org/browse/SERVER-12983</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;It appears that if a 2.4 DB which was backed up using MongoDump is then restored via MongoRestore into 2.6 and that dump contains an index which is too large to index, then the restore &lt;b&gt;stops&lt;/b&gt; and leaves the DB incompleted.&lt;/p&gt;

&lt;p&gt;Notice how the last line from MongoRestore is&lt;/p&gt;

&lt;p&gt;Error creating index LearningLine.Conversation: 17282 err: &quot;Btree::insert: key too large to index, failing LearningLine.Conversation.$find_messages_by_activity 1426 { : { Attachments: [], LastAttachmentId: 0, C...&quot;&lt;/p&gt;

&lt;p&gt;This is NOT the final collection to restore.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="116239">SERVER-12983</key>
            <summary>Restore from 2.4 DB into 2.6 DB fails due to index?</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="mkennedy66996693">Michael Kennedy</reporter>
                        <labels>
                    </labels>
                <created>Sat, 1 Mar 2014 17:36:59 +0000</created>
                <updated>Wed, 20 Jan 2016 22:39:36 +0000</updated>
                            <resolved>Sun, 2 Mar 2014 00:02:02 +0000</resolved>
                                    <version>2.6.0-rc0</version>
                                                    <component>Tools</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="1149320" author="dblock" created="Wed, 20 Jan 2016 22:39:36 +0000"  >&lt;p&gt;Yup, opened &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-22251&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-22251&lt;/a&gt;, the 2.6 version of the shell at least seems to be doing something.&lt;/p&gt;</comment>
                            <comment id="1149277" author="dan@10gen.com" created="Wed, 20 Jan 2016 22:11:52 +0000"  >&lt;p&gt;Pretty sure you&apos;ve found a bug in the upgradeChecker in 3.2.1.&lt;/p&gt;

&lt;p&gt;Can you use the 2.6 mongo shell and try again.  Also, upgradeCheckAllDBs() is just a convenience method to do the iteration for you.&lt;/p&gt;</comment>
                            <comment id="1149241" author="dblock" created="Wed, 20 Jan 2016 21:47:19 +0000"  >&lt;p&gt;Running 3.2.1 shell against a 2.4 MongoDB.&lt;/p&gt;

&lt;p&gt;$ mongo ...&lt;br/&gt;
MongoDB shell version: 3.2.1&lt;br/&gt;
connecting to: ...&lt;br/&gt;
&amp;gt; db.upgradeCheck()&lt;br/&gt;
database &apos;gravity-staging&apos; for 2.6 upgrade compatibility&lt;br/&gt;
...&lt;br/&gt;
Everything in &apos;gravity-staging&apos; is ready for the upgrade!&lt;/p&gt;

&lt;p&gt;^^^ lies &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/wink.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;

&lt;p&gt;I cannot run upgradeCheckAllDBs() because this is a Compose deployment, I don&apos;t have admin access. I assume that it just iterates over and does upgradeCheck?&lt;/p&gt;</comment>
                            <comment id="1149224" author="dan@10gen.com" created="Wed, 20 Jan 2016 21:33:08 +0000"  >&lt;p&gt;What exactly are you running for upgradeCheck?  What version of the shell and mongodb are you using?&lt;br/&gt;
Are you following this documentation: &lt;a href=&quot;https://docs.mongodb.org/manual/reference/method/db.upgradeCheckAllDBs?&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.org/manual/reference/method/db.upgradeCheckAllDBs?&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1149197" author="dblock" created="Wed, 20 Jan 2016 21:14:40 +0000"  >&lt;p&gt;Finding these has been a painful trial/error process, mongodump, mongorestore, restart once the next one fails. &lt;/p&gt;

&lt;p&gt;db.upgradeCheck() returned nothing&lt;/p&gt;

&lt;p&gt;The error from the index creation from mongoimport just leaves you guessing, hunting for the document ID that causes the problem. It would be nice it it at least returned the ID of the document - the one below for example doesn&apos;t get found with a regex because it&apos;s not in the index (partial index)? &lt;/p&gt;

&lt;p&gt;Failed: gravity-staging.events: error creating indexes for gravity-staging.events: createIndex error: Btree::insert: key too large to index, failing gravity-staging.events.$name_1 6590 { : &quot;Activities New York / Description Soonja Han&apos;s Paris Studio gets reconstructed within the de Buck gallery in Chelsea, NY:   An interrogation of the ar...&quot; }&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/sad.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>
                            <comment id="1149164" author="dan@10gen.com" created="Wed, 20 Jan 2016 20:52:05 +0000"  >&lt;p&gt;Hi DB,&lt;br/&gt;
Sorry you hit this, but as you can see this repairs a major correctness issue.  Starting with 2.6, if the index key is too long, the document is rejected.  The change is described in this ticket: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-5290&quot; title=&quot;fail to insert docs with fields too long to index, and fail to create indexes where doc keys are too big&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-5290&quot;&gt;&lt;del&gt;SERVER-5290&lt;/del&gt;&lt;/a&gt;.  If the run parameter &lt;tt&gt;failIndexKeyTooLong&lt;/tt&gt; is set to false, the document will be inserted, but the index entry will not be created.&lt;/p&gt;

&lt;p&gt;This is documented here: &lt;br/&gt;
&lt;a href=&quot;https://docs.mongodb.org/manual/reference/parameters/#param.failIndexKeyTooLong&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.org/manual/reference/parameters/#param.failIndexKeyTooLong&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1148254" author="dblock" created="Wed, 20 Jan 2016 05:13:46 +0000"  >&lt;p&gt;FWIW I spent the majority of the afternoon working around this error, collection after collection. We query data by the problematic indexe(s) so this restriction and the inability to ignore and continue came as a surprise on a mongorestore. Being able to run the server in an old(er) mode is fine, but we don&apos;t run our own, I would have liked to get (or be able to get) a warning instead of a hard error here. &lt;/p&gt;

&lt;p&gt;Related, I couldn&apos;t find in the documentation anything about the semantics of inserting a record when the index key produced would be too long - does the record get inserted or not?&lt;/p&gt;</comment>
                            <comment id="508024" author="mkennedy66996693" created="Mon, 3 Mar 2014 15:58:29 +0000"  >&lt;p&gt;Hi Dan,&lt;/p&gt;

&lt;p&gt;Yes, that is what my understanding was. I filed the bug because I think this is wrong.&lt;/p&gt;

&lt;p&gt;It&apos;s fine for runtime. But I want a flag or something for *&lt;b&gt;mongorestore&lt;/b&gt;* which says something like &apos;continue on index error&apos; or &apos;drop indexes that are incompatible with 2.6&apos; or something. I do not want to run the server is a downgraded mode. I just want to import the data, acknowledging the problems and changes.&lt;/p&gt;</comment>
                            <comment id="507863" author="dan@10gen.com" created="Mon, 3 Mar 2014 05:19:39 +0000"  >&lt;p&gt;With the new restrictions on index key length, you have a couple options to restore databases with such documents.  &lt;br/&gt;
1. restore with a 2.4 server, then restart with 2.6 binary.  &lt;br/&gt;
2. run with server with the &lt;tt&gt;failIndexKeyTooLong&lt;/tt&gt; set to false to override the new behavior.&lt;/p&gt;

&lt;p&gt;In either case, it is &lt;b&gt;highly&lt;/b&gt; recommended that the documents are cleaned up to avoid condition if possible as results from indexes will not be usable for docs with this keys that are too long.&lt;/p&gt;</comment>
                            <comment id="507750" author="mkennedy66996693" created="Sun, 2 Mar 2014 04:43:03 +0000"  >&lt;p&gt;Thanks for looking at this Dan. I&apos;m not sure I would classify it as duplicate. &lt;/p&gt;

&lt;p&gt;I think there is a difference between attempting a DB restore and attempting to create an improper index and runtime or doing an insert which is invalid. I don&apos;t want to run the server in a degraded mode, I just want to restore data and acknowledge any index errors (but continue)&lt;/p&gt;</comment>
                            <comment id="507744" author="dan@10gen.com" created="Sun, 2 Mar 2014 00:02:02 +0000"  >&lt;p&gt;duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12982&quot; title=&quot;Could not restore backup data due to &amp;quot;key too large to index&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12982&quot;&gt;&lt;del&gt;SERVER-12982&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="116154">SERVER-12982</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="38735" name="C__WINDOWS_system32_cmd.exe (53).png" size="43821" author="mkennedy66996693" created="Sat, 1 Mar 2014 17:36:59 +0000"/>
                    </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>Sun, 2 Mar 2014 00:02:02 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 4 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>dblock</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 4 weeks 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>dblock</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>mkennedy66996693</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrm04v:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>103399</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;Use this command and see screenshot.&lt;/p&gt;

&lt;p&gt;mongorestore --drop --db DB &quot;.\DB&quot;&lt;br/&gt;
echo done&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|hrotfb:</customfieldvalue>

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