<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:41:33 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>[CSHARP-2075] C# - MapReduce (MongoDB.Driver) does not work when Limit is passed as MapReduceOptions</title>
                <link>https://jira.mongodb.org/browse/CSHARP-2075</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Mongo database: 3.0.4&lt;br/&gt;
MongoDB.Driver: 2.4.4&lt;/p&gt;


&lt;p&gt;I am trying to make a Map reduce from a collection, and as MapReduceOption I am passing the option Limit (e.g. 10).&lt;br/&gt;
The database where is this collection is not sharded.&lt;/p&gt;

&lt;p&gt;However when i run my code it breaks with this message:&lt;br/&gt;
unknown m/r field for sharding: limit&lt;/p&gt;

</description>
                <environment></environment>
        <key id="452746">CSHARP-2075</key>
            <summary>C# - MapReduce (MongoDB.Driver) does not work when Limit is passed as MapReduceOptions</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="rribeiro">Rui Ribeiro</reporter>
                        <labels>
                            <label>question</label>
                    </labels>
                <created>Mon, 30 Oct 2017 17:26:01 +0000</created>
                <updated>Fri, 5 Apr 2019 13:58:15 +0000</updated>
                            <resolved>Mon, 8 Jan 2018 21:17:06 +0000</resolved>
                                    <version>2.4.4</version>
                                                    <component>Read Operations</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1768198" author="rstam" created="Mon, 8 Jan 2018 21:16:52 +0000"  >&lt;p&gt;See the related server ticket.&lt;/p&gt;

&lt;p&gt;As the server team has decided not to support this I am closing this driver ticket.&lt;/p&gt;

&lt;p&gt;You should comment on the server ticket if you wish to encourage the server team to support this scenario.&lt;/p&gt;</comment>
                            <comment id="1726246" author="rribeiro" created="Wed, 15 Nov 2017 11:32:19 +0000"  >&lt;p&gt;Any news about this issue?&lt;/p&gt;</comment>
                            <comment id="1716549" author="rribeiro" created="Fri, 3 Nov 2017 15:34:40 +0000"  >&lt;p&gt;Yes I am running a sharded cluster, but this collection in particular is not sharded&lt;/p&gt;</comment>
                            <comment id="1716547" author="rribeiro" created="Fri, 3 Nov 2017 15:33:47 +0000"  >&lt;p&gt;Thank you for the reply.&lt;/p&gt;

&lt;p&gt;I understand that does not work when it is &lt;b&gt;against a sharded collection&lt;/b&gt;.&lt;br/&gt;
But my map reduce is being applied for a *&lt;b&gt;non sharded&lt;/b&gt; collection*.&lt;/p&gt;

&lt;p&gt;If I do this: db.abc.&lt;b&gt;getShardDistribution()&lt;/b&gt;;&lt;br/&gt;
It says: Collection abc &lt;b&gt;is not sharded&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;Even the output collection of my map reduced I am setting to sharded = false&lt;/p&gt;

&lt;p&gt;So why in this scenario it still does not work?&lt;/p&gt;
</comment>
                            <comment id="1716541" author="rstam" created="Fri, 3 Nov 2017 15:27:40 +0000"  >&lt;p&gt;I just noticed that you say the collection you are running the map/reduce against is &lt;b&gt;not&lt;/b&gt; sharded.&lt;/p&gt;

&lt;p&gt;That&apos;s interesting. Can you elaborate? Are you running a sharded cluster, but this one collection is not sharded?&lt;/p&gt;
</comment>
                            <comment id="1716536" author="rstam" created="Fri, 3 Nov 2017 15:24:22 +0000"  >&lt;p&gt;This is actually a limitation of the server, which does not support the limit option when doing a map/reduce against a sharded collection.&lt;/p&gt;

&lt;p&gt;See:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2099&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-2099&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="13702">SERVER-2099</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htat73:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>