<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:33: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-13927] Copydb breaks on (some) capped collections</title>
                <link>https://jira.mongodb.org/browse/SERVER-13927</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;capped collections in earlier versions of mongodb (2.4.x) can sometimes look like this:&lt;br/&gt;
{ &quot;name&quot; : &quot;test-1.two&quot;, &quot;options&quot; : &lt;/p&gt;
{ &quot;create&quot; : &quot;two&quot;, &quot;size&quot; : 1000000, &quot;max&quot; : &quot;&quot;, &quot;capped&quot; : true, &quot;autoIndexId&quot; : true }
&lt;p&gt; },&lt;br/&gt;
when a database with a capped collection like that is upgraded to 2.6.1, and then a copydatabase is run against it, the copy database succeeds, but the capped collections are not copied properly&lt;/p&gt;</description>
                <environment></environment>
        <key id="136297">SERVER-13927</key>
            <summary>Copydb breaks on (some) capped collections</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="rassi">J Rassi</assignee>
                                    <reporter username="nstott">Nick Stott</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 May 2014 19:30:19 +0000</created>
                <updated>Wed, 10 Dec 2014 23:04:34 +0000</updated>
                            <resolved>Tue, 20 May 2014 22:07:06 +0000</resolved>
                                    <version>2.6.1</version>
                                                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="590853" author="dan@10gen.com" created="Tue, 20 May 2014 22:07:06 +0000"  >&lt;p&gt;Closing as duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13737&quot; title=&quot;CollectionOptions parser should skip &amp;quot;size&amp;quot;/&amp;quot;max&amp;quot; elements if values non-numeric&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13737&quot;&gt;&lt;del&gt;SERVER-13737&lt;/del&gt;&lt;/a&gt; which will be fixed in server version 2.6.2.  Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=nstott&quot; class=&quot;user-hover&quot; rel=&quot;nstott&quot;&gt;nstott&lt;/a&gt; for your help tracking down this issue.&lt;/p&gt;</comment>
                            <comment id="587109" author="rassi@10gen.com" created="Sat, 17 May 2014 00:45:51 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=nstott&quot; class=&quot;user-hover&quot; rel=&quot;nstott&quot;&gt;nstott&lt;/a&gt;: thanks again for reporting this.  We&apos;ve opened &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13968&quot; title=&quot;Report invalid collection options in &amp;quot;&amp;lt;db&amp;gt;.system.namespaces&amp;quot; in upgrade checker&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13968&quot;&gt;&lt;del&gt;SERVER-13968&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13976&quot; title=&quot;Cloner needs to detect failure to create collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13976&quot;&gt;&lt;del&gt;SERVER-13976&lt;/del&gt;&lt;/a&gt; as a result.&lt;/p&gt;

&lt;p&gt;Could you let us know how these collections were created (perhaps the db.createCollection() shell helper, or the db.runCommand(...) shell helper, or a &quot;create collection&quot; helper from an official driver)?  This will help us assess how widespread the issue is of having a collection with an invalid value of &quot;max&quot; in the collection options.&lt;/p&gt;

&lt;p&gt;It&apos;s (unfortunately) not possible to manipulate the collection options directly to remove the invalid collection option.  If you are able to take this node offline for a maintenance window, you can use dump/restore to remove the invalid collection option with the following:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Dump the collection contents: &lt;tt&gt;mongodump -d test-1 -c two -o dump/&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;Drop the collection (assuming the dump was successful): &lt;tt&gt;mongo --eval &apos;db.getSiblingDB(&quot;test-1&quot;).two.drop()&apos;&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;Create the collection with the correct options: &lt;tt&gt;mongo --eval &apos;db.getSiblingDB(&quot;test-1&quot;).runCommand({create: &quot;two&quot;, size: 1000000, capped: true})&apos;&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;Restore the collection contents: &lt;tt&gt;mongorestore dump/&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;You can also use the &lt;a href=&quot;http://docs.mongodb.org/manual/reference/command/convertToCapped/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;convertToCapped&lt;/a&gt; command to restore cappedness to any copies already made of this collection.&lt;/p&gt;</comment>
                            <comment id="582851" author="nstott" created="Wed, 14 May 2014 02:08:08 +0000"  >&lt;p&gt;yes, it loses that meta data on a resync as well&lt;br/&gt;
on a capped collection as shown above brought in from an earlier version, stopping the secondary, removing the local.*, starting the secondary will reproduce this behaviour.&lt;/p&gt;

&lt;p&gt;on the primary I have:&lt;br/&gt;
{ &quot;name&quot; : &quot;test-a.capped&quot;, &quot;options&quot; : &lt;/p&gt;
{ &quot;create&quot; : &quot;capped&quot;, &quot;size&quot; : 100000, &quot;max&quot; : &quot;&quot;, &quot;capped&quot; : true, &quot;autoIndexId&quot; : true }
&lt;p&gt; }&lt;br/&gt;
{ &quot;name&quot; : &quot;test-a.uncapped&quot;, &quot;options&quot; : &lt;/p&gt;
{ &quot;create&quot; : &quot;uncapped&quot;, &quot;size&quot; : &quot;&quot;, &quot;max&quot; : &quot;&quot;, &quot;capped&quot; : false }
&lt;p&gt; }&lt;/p&gt;

&lt;p&gt;and on the secondary, I just have&lt;/p&gt;
{ &quot;name&quot; : &quot;test-a.capped&quot; }
{ &quot;name&quot; : &quot;test-a.uncapped&quot; }
</comment>
                            <comment id="582775" author="nstott" created="Wed, 14 May 2014 00:01:43 +0000"  >&lt;p&gt;I agree, it&apos;s the max:&quot;&quot; that seems to break things, &lt;br/&gt;
I wonder if that will break on a resync as well, that would be annoying.. I&apos;ll have a look at that&lt;/p&gt;
</comment>
                            <comment id="582740" author="thomasr" created="Tue, 13 May 2014 23:21:54 +0000"  >&lt;p&gt;The problem seems to be the non-numeric value in the &quot;max&quot; field. This wasn&apos;t validated in createCollection in 2.4.x (it is now, in 2.6.x). The capped-ness of the collection is not preserved in that case.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rassi%4010gen.com&quot; class=&quot;user-hover&quot; rel=&quot;rassi@10gen.com&quot;&gt;rassi@10gen.com&lt;/a&gt;, can you have a look at this?&lt;/p&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="136990">SERVER-13976</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="136752">SERVER-13968</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="133330">SERVER-13737</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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 13 May 2014 19:36:08 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 39 weeks, 1 day 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>
                            9 years, 39 weeks, 1 day 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>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>rassi</customfieldvalue>
            <customfieldvalue>nstott</customfieldvalue>
            <customfieldvalue>thomas.rueckstiess@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlerj:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>117291</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. in 2.4.x, create a capped collection as above&lt;br/&gt;
2. upgrade to 2.6&lt;br/&gt;
3. run a copydatabase onto a new 2.6 instance&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|hrj52f:</customfieldvalue>

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