<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:33: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-13905] MapReduce to empty capped collection results in NON-capped collection</title>
                <link>https://jira.mongodb.org/browse/SERVER-13905</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When doing a map reduce where the out collection is an empty capped collection and the out method of reduce, the result is a non-capped collection.&lt;br/&gt;
If the out is a non empty capped collection, then it remain capped.&lt;/p&gt;</description>
                <environment></environment>
        <key id="136006">SERVER-13905</key>
            <summary>MapReduce to empty capped collection results in NON-capped 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="9">Done</resolution>
                                        <assignee username="dan@mongodb.com">Daniel Pasette</assignee>
                                    <reporter username="levyavi">Avi Levy</reporter>
                        <labels>
                    </labels>
                <created>Mon, 12 May 2014 12:53:37 +0000</created>
                <updated>Tue, 8 Mar 2016 00:42:51 +0000</updated>
                            <resolved>Tue, 8 Mar 2016 00:42:51 +0000</resolved>
                                    <version>2.4.10</version>
                    <version>2.6.0</version>
                                    <fixVersion>3.1.3</fixVersion>
                                    <component>MapReduce</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="1195877" author="redbeard0531" created="Tue, 8 Mar 2016 00:42:51 +0000"  >&lt;p&gt;This was fixed as part of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18227&quot; title=&quot;Document Validation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18227&quot;&gt;&lt;del&gt;SERVER-18227&lt;/del&gt;&lt;/a&gt; in commit &lt;a href=&quot;https://github.com/mongodb/mongo/commit/22de12dd4ac510cd2a37b643eb528673f651e21b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/22de12dd4ac510cd2a37b643eb528673f651e21b&lt;/a&gt;. We now propagate all options when doing a map reduce onto an existing collection.&lt;/p&gt;</comment>
                            <comment id="580751" author="rassi@10gen.com" created="Mon, 12 May 2014 15:47:18 +0000"  >&lt;p&gt;Confirmed with 2.4.10, 2.6.1.&lt;/p&gt;

&lt;p&gt;Assigning to &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=dan%4010gen.com&quot; class=&quot;user-hover&quot; rel=&quot;dan@10gen.com&quot;&gt;dan@10gen.com&lt;/a&gt; for triage.&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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 12 May 2014 15:47:18 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 49 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="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>levyavi</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>rassi</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlv73:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>117043</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;db.input.drop()&lt;br/&gt;
db.cap.drop()&lt;br/&gt;
db.input.insert(&lt;/p&gt;
{foo:&quot;bar&quot;}
&lt;p&gt;)&lt;br/&gt;
var map = function() {&lt;br/&gt;
	var key = this._id;&lt;br/&gt;
	var value = 1;&lt;br/&gt;
	emit(key, value );&lt;br/&gt;
}&lt;br/&gt;
var reduce = function(key, values) {&lt;br/&gt;
	return Array.sum(values);&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;db.createCollection(&quot;cap&quot;,&lt;/p&gt;
{capped:true,size:100000}
&lt;p&gt;)&lt;br/&gt;
db.cap.stats() // Collection is capped&lt;br/&gt;
db.input.mapReduce(map,reduce,{out:{reduce:&quot;cap&quot;}})	&lt;br/&gt;
db.cap.stats() // Collection is not capped&lt;/p&gt;

&lt;p&gt;//M/R to non empty capped collection&lt;br/&gt;
db.cap.drop()&lt;br/&gt;
db.createCollection(&quot;cap&quot;,&lt;/p&gt;
{capped:true,size:100000}
&lt;p&gt;)&lt;br/&gt;
db.cap.insert(&lt;/p&gt;
{dummy:true}
&lt;p&gt;)&lt;br/&gt;
db.cap.stats() // Collection is capped&lt;br/&gt;
db.input.mapReduce(map,reduce,{out:{reduce:&quot;cap&quot;}})	&lt;br/&gt;
db.cap.stats() // Collection is capped&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|hsgxaf:</customfieldvalue>

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