<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56:32 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-1263] setSlaveOk has no effect with group() queries</title>
                <link>https://jira.mongodb.org/browse/SERVER-1263</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Executing db.getMongo().setSlaveOk() allows me to run a map reduce query on a replica pair slave but the equivalent group() query does not work. Reproduced on v1.4.1 and v1.4.3.&lt;/p&gt;

&lt;p&gt;Master:&lt;/p&gt;

&lt;p&gt;&amp;gt; db.sd_boxedice_checksLoadAvrg.group(&lt;br/&gt;
... {&lt;br/&gt;
...      initial: &lt;/p&gt;
{count: 0, running_average: 0}
&lt;p&gt;,&lt;br/&gt;
...      reduce: function(doc, out) &lt;br/&gt;
...      &lt;/p&gt;
{
...           out.count++;
...           out.running_average+=doc.v;
...      },&lt;br/&gt;
...      finalize: function(out)&lt;br/&gt;
...      {
...           out.average = out.running_average / out.count;
...      }&lt;br/&gt;
... }&lt;br/&gt;
... );&lt;br/&gt;
[&lt;br/&gt;
	{
		&quot;count&quot; : 204931,
		&quot;running_average&quot; : 131253.02999999493,
		&quot;average&quot; : 0.6404742571889803
	}&lt;br/&gt;
]&lt;br/&gt;
&lt;br/&gt;
Slave&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&amp;gt; db.sd_boxedice_checksLoadAvrg.group(&lt;br/&gt;
... {&lt;br/&gt;
...      initial: {count: 0, running_average: 0},&lt;br/&gt;
...      reduce: function(doc, out) &lt;br/&gt;
...      {...           out.count++;...           out.running_average+=doc.v;...      }
&lt;p&gt;,&lt;br/&gt;
...      finalize: function(out)&lt;br/&gt;
...      &lt;/p&gt;
{
...           out.average = out.running_average / out.count;
...      }
&lt;p&gt;... }&lt;br/&gt;
... );&lt;br/&gt;
[ &lt;/p&gt;
{ &quot;count&quot; : 1, &quot;running_average&quot; : NaN, &quot;average&quot; : NaN }
&lt;p&gt; ]&lt;/p&gt;</description>
                <environment>Sun May 23 16:25:17 db version v1.4.1, pdfile version 4.5&lt;br/&gt;
Sun May 23 16:25:17 git version: 5b29dec9707d50979c283057ca1b1572351eef9a&lt;br/&gt;
Sun May 23 16:25:17 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41&lt;br/&gt;
&lt;br/&gt;
and&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
Wed Jun  9 19:27:44 db version v1.4.3, pdfile version 4.5&lt;br/&gt;
Wed Jun  9 19:27:44 git version: 47ffbdfd53f46edeb6ff54bbb734783db7abc8ca&lt;br/&gt;
Wed Jun  9 19:27:44 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41</environment>
        <key id="12203">SERVER-1263</key>
            <summary>setSlaveOk has no effect with group() queries</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="antoine">Antoine Girbal</assignee>
                                    <reporter username="boxedice">David Mytton</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Jun 2010 10:56:51 +0000</created>
                <updated>Tue, 29 May 2012 14:53:16 +0000</updated>
                            <resolved>Wed, 5 Jan 2011 07:20:38 +0000</resolved>
                                    <version>1.4.1</version>
                    <version>1.4.3</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="22077" author="antoine" created="Wed, 5 Jan 2011 07:20:38 +0000"  >&lt;p&gt;this is covered by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2286&quot; title=&quot;slaveOk is ignored for group() and mapReduce(), these are allowed to run on slave always&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2286&quot;&gt;&lt;del&gt;SERVER-2286&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="21675" author="eliot" created="Tue, 21 Dec 2010 22:45:23 +0000"  >&lt;p&gt;Was that as a replica set?&lt;br/&gt;
THe best test would be bring up a 3 node replica set.&lt;br/&gt;
Run against a secondary &lt;br/&gt;
without SLAVE_OK should fail&lt;br/&gt;
with SLAVE_OK should work&lt;/p&gt;</comment>
                            <comment id="21674" author="antoine" created="Tue, 21 Dec 2010 22:42:58 +0000"  >&lt;p&gt;I am not able to reproduce the issue.&lt;br/&gt;
I started 1 mongod on 27017 as master, and 1 mongod on 27018 as slave.&lt;br/&gt;
Then connected client to to 27018 and killed master mongod.&lt;br/&gt;
I was still able to run group queries on the slave:&lt;/p&gt;

&lt;p&gt;&amp;gt; db.test.find()&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;4d112911220ecff98cc83d96&quot;), &quot;a&quot; : 1 }
{ &quot;_id&quot; : ObjectId(&quot;4d11291f220ecff98cc83d97&quot;), &quot;a&quot; : 2 }
&lt;p&gt;&amp;gt; db.test.group({&lt;br/&gt;
... initial: &lt;/p&gt;
{count: 0}
&lt;p&gt;,&lt;br/&gt;
... reduce: function(obj,out) &lt;/p&gt;
{
... out.count++;
... }
&lt;p&gt;,&lt;br/&gt;
... finalize: function(out) &lt;/p&gt;
{
... out.count *= 10;
... }
&lt;p&gt;... })&lt;br/&gt;
[ &lt;/p&gt;
{ &quot;count&quot; : 20 }
&lt;p&gt; ]&lt;br/&gt;
&amp;gt; db.test.insert(&lt;/p&gt;
{b:1}
&lt;p&gt;)&lt;br/&gt;
not master&lt;br/&gt;
&amp;gt;&lt;/p&gt;</comment>
                            <comment id="20051" author="dwight_10gen" created="Fri, 5 Nov 2010 15:03:45 +0000"  >&lt;p&gt;replica pairs are deprecated so i would propose we close this as &quot;wrong but will not fix&quot;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 5 Nov 2010 15:03:45 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 7 weeks 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>antoine</customfieldvalue>
            <customfieldvalue>boxedice</customfieldvalue>
            <customfieldvalue>dwight@mongodb.com</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hriijr:</customfieldvalue>

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

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

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