<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:58:58 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-2099] MapReduce does not allow limit as one attribute on a sharded setup</title>
                <link>https://jira.mongodb.org/browse/SERVER-2099</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We have sharded setup on 2 machines and have a 120GB collection on these machines.&lt;/p&gt;

&lt;p&gt;Ran a mapreduce job through db.runCommand with a limit attribute, to test the map-reduce functions and it did threw an error message that limit attribute is not allowed.&lt;/p&gt;

&lt;p&gt;Specifics &lt;/p&gt;

&lt;p&gt;db.runCommand({mapreduce: &quot;bigdm&quot;,&lt;br/&gt;
    map:m,&lt;br/&gt;
    reduce: r,&lt;br/&gt;
    limit:100,&lt;br/&gt;
    query: { &quot;dynamicRL&quot; : { &quot;$exists&quot; : true}},&lt;br/&gt;
    out: &quot;dt&quot;,&lt;br/&gt;
    verbose: true});&lt;/p&gt;

&lt;p&gt;It gives me following error message&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
        &quot;assertion&quot; : &quot;don&apos;t know mr field: limit&quot;,&lt;br/&gt;
        &quot;assertionCode&quot; : 10177,&lt;br/&gt;
        &quot;errmsg&quot; : &quot;db assertion failure&quot;,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment>OS - Linux hqd-soak-03 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010 x86_64 x86_64 x86_64 GNU/Linux</environment>
        <key id="13702">SERVER-2099</key>
            <summary>MapReduce does not allow limit as one attribute on a sharded setup</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="backlog-server-query">Backlog - Query Team</assignee>
                                    <reporter username="harshadchavan">hc</reporter>
                        <labels>
                    </labels>
                <created>Tue, 16 Nov 2010 00:59:48 +0000</created>
                <updated>Tue, 6 Dec 2022 05:47:03 +0000</updated>
                            <resolved>Mon, 22 May 2017 20:36:35 +0000</resolved>
                                    <version>1.6.3</version>
                                                    <component>MapReduce</component>
                                        <votes>2</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1577101" author="asya" created="Mon, 22 May 2017 20:36:35 +0000"  >&lt;p&gt;We&apos;re closing this ticket as &quot;Won&apos;t Fix&quot; as the concept of &quot;limit&quot; doesn&apos;t make sense to apply to MapReduce as discussed here (especially since it wouldn&apos;t work well in a sharded environment as pointed out in the comments).&lt;/p&gt;

&lt;p&gt;If the goal is to limit processing to a random subset of documents, aggregation provides a &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/aggregation/sample/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;$sample stage&lt;/a&gt; to only pass through a random subset of documents.&lt;/p&gt;

</comment>
                            <comment id="29413" author="plasma" created="Thu, 21 Apr 2011 03:29:35 +0000"  >&lt;p&gt;I don&apos;t use MR yet, but perhaps limit would better be named sample size?&lt;/p&gt;

&lt;p&gt;Since MR is not ordered, perhaps a sample size argument would mean at most X documents would be processed per shard?&lt;/p&gt;

&lt;p&gt;I assume its useful in MR to have a limit so you can get an approximate answer to see if a query looks right, then run the full query when you&apos;re happy?&lt;/p&gt;</comment>
                            <comment id="21991" author="eliot" created="Mon, 3 Jan 2011 15:47:46 +0000"  >&lt;p&gt;Still not sure what the right thing to do is.&lt;/p&gt;</comment>
                            <comment id="20543" author="eliot" created="Sun, 21 Nov 2010 05:07:52 +0000"  >&lt;p&gt;Its unclear what the semantics are of limit in this case.&lt;br/&gt;
We don&apos;t want to apply it serially, as on a large limit that could be slow.&lt;br/&gt;
But also don&apos;t want to apply separately as then its not accurate.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="452746">CSHARP-2075</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>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 21 Nov 2010 05:07:52 +0000</customfieldvalue>

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

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>plasma</customfieldvalue>
            <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-query</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>harshadchavan</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpbcv:</customfieldvalue>

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

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

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