<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:01:07 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-2761] Confusing Map / Reduce output when sharded</title>
                <link>https://jira.mongodb.org/browse/SERVER-2761</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In a sharded environment, the output of the &quot;mapreduce&quot; command is confusing.&lt;/p&gt;

&lt;p&gt;Following is a map-reduce that generates a &quot;tags&quot; collection. That &quot;tags&quot; collection contains 5077 documents.&lt;/p&gt;

&lt;p&gt;Problems: &lt;br/&gt;
 #1: There is no indication of 5077 anywhere in that output.&lt;br/&gt;
 #2: Based on the groups question, it looks like the output value from each shard may not be the last reduction for that node.&lt;br/&gt;
So the output value for a node may misrepresent that data that is actually on that node.&lt;/p&gt;

&lt;p&gt;======&lt;br/&gt;
&amp;gt; db.runCommand( &lt;/p&gt;
{ mapreduce: &apos;test&apos;, map:map, reduce:reduce, out : &apos;tags&apos;}
&lt;p&gt; );                 &lt;br/&gt;
{&lt;br/&gt;
	&quot;result&quot; : &quot;tags&quot;,&lt;br/&gt;
	&quot;shardCounts&quot; : {&lt;br/&gt;
		&quot;localhost:6900&quot; : &lt;/p&gt;
{
			&quot;input&quot; : 36443,
			&quot;emit&quot; : 30756,
			&quot;output&quot; : 2906
		}
&lt;p&gt;,&lt;br/&gt;
		&quot;localhost:6901&quot; : &lt;/p&gt;
{
			&quot;input&quot; : 18808,
			&quot;emit&quot; : 12933,
			&quot;output&quot; : 1948
		}
&lt;p&gt;,&lt;br/&gt;
		&quot;localhost:6902&quot; : &lt;/p&gt;
{
			&quot;input&quot; : 27274,
			&quot;emit&quot; : 24070,
			&quot;output&quot; : 2765
		}
&lt;p&gt;,&lt;br/&gt;
		&quot;localhost:6903&quot; : &lt;/p&gt;
{
			&quot;input&quot; : 45220,
			&quot;emit&quot; : 43915,
			&quot;output&quot; : 3742
		}
&lt;p&gt;,&lt;br/&gt;
		&quot;localhost:6904&quot; : &lt;/p&gt;
{
			&quot;input&quot; : 48399,
			&quot;emit&quot; : 45688,
			&quot;output&quot; : 3842
		}
&lt;p&gt;,&lt;br/&gt;
		&quot;localhost:6905&quot; : &lt;/p&gt;
{
			&quot;input&quot; : 27413,
			&quot;emit&quot; : 23050,
			&quot;output&quot; : 2837
		}
&lt;p&gt;	},&lt;br/&gt;
	&quot;counts&quot; : &lt;/p&gt;
{
		&quot;emit&quot; : NumberLong(180412),
		&quot;input&quot; : NumberLong(203557),
		&quot;output&quot; : NumberLong(18040)
	}
&lt;p&gt;,&lt;br/&gt;
	&quot;ok&quot; : 1,&lt;br/&gt;
	&quot;timeMillis&quot; : 10978,&lt;br/&gt;
	&quot;timing&quot; : &lt;/p&gt;
{
		&quot;shards&quot; : 10609,
		&quot;final&quot; : 368
	}
&lt;p&gt;}&lt;br/&gt;
&amp;gt; db.tags.count()&lt;br/&gt;
5077&lt;br/&gt;
======&lt;/p&gt;

&lt;p&gt;Associated groups question:&lt;br/&gt;
&lt;a href=&quot;http://groups.google.com/group/mongodb-user/browse_thread/thread/65869b34e4230a3b#&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/mongodb-user/browse_thread/thread/65869b34e4230a3b#&lt;/a&gt;&lt;/p&gt;</description>
                <environment>Any</environment>
        <key id="15122">SERVER-2761</key>
            <summary>Confusing Map / Reduce output when sharded</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="5" iconUrl="https://jira.mongodb.org/images/icons/priorities/trivial.svg">Trivial - P5</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="antoine">Antoine Girbal</assignee>
                                    <reporter username="gatesvp">Gaetan Voyer-Perrault</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Mar 2011 19:00:55 +0000</created>
                <updated>Tue, 12 Jul 2016 00:18:30 +0000</updated>
                            <resolved>Mon, 13 Jun 2011 23:21:13 +0000</resolved>
                                    <version>1.8.0-rc2</version>
                                    <fixVersion>1.9.1</fixVersion>
                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="37400" author="antoine" created="Mon, 13 Jun 2011 23:21:13 +0000"  >&lt;p&gt;Fixed:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;output is now final number of doc in final collection&lt;/li&gt;
	&lt;li&gt;reduce count is number of reduce of each shard plus the ones done in final step&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;{ &quot;result&quot; : &quot;mroutputshard&quot; , &lt;br/&gt;
&quot;shardCounts&quot; : &lt;br/&gt;
{ &quot;foo/localhost:27017&quot; : &lt;/p&gt;
{ &quot;input&quot; : 1264 , &quot;emit&quot; : 1264 , &quot;reduce&quot; : 34 , &quot;output&quot; : 26}
&lt;p&gt; , &lt;br/&gt;
&quot;foo2/localhost:37017&quot; : { &quot;input&quot; : 1238 , &quot;emit&quot; : 1238 , &quot;reduce&quot; : 48 , &quot;output&quot; : 39}} ,&lt;br/&gt;
&quot;counts&quot; : &lt;/p&gt;
{ &quot;emit&quot; : 2502 , &quot;input&quot; : 2502 , &quot;output&quot; : 40 , &quot;reduce&quot; : 107}
&lt;p&gt; , &lt;br/&gt;
&quot;ok&quot; : 1.0 , &quot;timeMillis&quot; : 1351 , &quot;timing&quot; : { &quot;shards&quot; : 1305 , &quot;final&quot; : 46}}&lt;/p&gt;</comment>
                            <comment id="37388" author="antoine" created="Mon, 13 Jun 2011 22:17:52 +0000"  >&lt;p&gt;the &quot;counts&quot; object is just the sum of same fields from each shard.&lt;br/&gt;
While &quot;emit&quot; and &quot;input&quot; are correct, &quot;output&quot; and &quot;reduce&quot; are wrong.&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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 13 Jun 2011 22:17:52 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 36 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 36 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>antoine</customfieldvalue>
            <customfieldvalue>gatesvp</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrp3lb:</customfieldvalue>

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

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

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