<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:07:20 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-4911] Temporary mapreduce collections cause mongodb to exceed namespace limit and breaks replication in replica sets</title>
                <link>https://jira.mongodb.org/browse/SERVER-4911</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Temporary mapreduce colelctions are not dropped when they are done being used. Furthermore, it is not possible to drop these collections manually as it just returns &quot;false&quot; without any reason.&lt;/p&gt;

&lt;p&gt;This eventually leads to this error on the secondaries in a replica set environment:&lt;br/&gt;
error: hashtable namespace index max chain reached:1335&lt;/p&gt;

&lt;p&gt;This eventually snowballs and the secondaries are put into recovery mode without warning, leaving only the primary node up and the entire shard inactive.&lt;/p&gt;

&lt;p&gt;I realize you can increase the nssize argument at the command line but it would only be a temporary solution. I&apos;ve attached the logs from one of the secondaries.&lt;/p&gt;</description>
                <environment>Windows 2008 R2</environment>
        <key id="30187">SERVER-4911</key>
            <summary>Temporary mapreduce collections cause mongodb to exceed namespace limit and breaks replication in replica sets</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="4">Incomplete</resolution>
                                        <assignee username="kristina">Kristina Chodorow</assignee>
                                    <reporter username="shane.andrade@cybercoders.com">Shane Andrade</reporter>
                        <labels>
                            <label>mapreduce</label>
                            <label>namespace</label>
                            <label>replicaset</label>
                    </labels>
                <created>Wed, 8 Feb 2012 17:28:31 +0000</created>
                <updated>Fri, 8 Mar 2013 15:56:01 +0000</updated>
                            <resolved>Wed, 29 Aug 2012 19:11:25 +0000</resolved>
                                    <version>2.0.2</version>
                                                    <component>Replication</component>
                    <component>Storage</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="114714" author="antoine" created="Mon, 30 Apr 2012 01:30:38 +0000"  >&lt;p&gt;Shane,&lt;br/&gt;
I have not been able to reproduce tmp collections not being dropped by MR, with 2.0.2 or 2.1.0.&lt;br/&gt;
This may be due to some special events like a setShardVersion error when establishing the cursor.&lt;br/&gt;
Is it still happening for you?&lt;br/&gt;
At what rate, e.g. every MR or a few but still piling up?&lt;br/&gt;
Assuming here that you use mode replace and that the input collection is sharded.&lt;/p&gt;</comment>
                            <comment id="89713" author="antoine" created="Sat, 18 Feb 2012 00:36:42 +0000"  >&lt;p&gt;Any occurrence in log of: &quot;Cannot cleanup shard results&quot;?&lt;br/&gt;
Also can you give sample names of temporary collections that are not deleted?&lt;/p&gt;</comment>
                            <comment id="87511" author="shane.andrade@cybercoders.com" created="Sat, 11 Feb 2012 03:56:04 +0000"  >&lt;p&gt;What sort of mapreduce errors would you be referring to? It&apos;s possible I&apos;ve seen them before but I&apos;m wondering if there&apos;s a particular type of error that would cause what we are seeing.&lt;/p&gt;</comment>
                            <comment id="87510" author="shane.andrade@cybercoders.com" created="Sat, 11 Feb 2012 03:53:06 +0000"  >&lt;p&gt;The collections are sharded... Here&apos;s an example:&lt;/p&gt;

&lt;p&gt;function Map() {&lt;br/&gt;
						emit(this._jobTitle, &lt;/p&gt;
{
							Company: this.Company,
							JobTitle: this.JobTitle,
							Location: this.Location,
							AverageSalary: this.AverageSalary * this.SalaryCount, 
							BottomSalary: this.BottomSalary, 
							TopSalary: this.TopSalary, 
							SalaryCount: this.SalaryCount, 
							ResponseCount: this.ResponseCount, 
							ReviewCount: this.ReviewCount, 
							ReviewScore: this.ReviewScore * this.ReviewCount
						}
&lt;p&gt;);&lt;/p&gt;


&lt;p&gt;function Reduce(key, values) {&lt;br/&gt;
							var agg = &lt;/p&gt;
{
								Company: null,
								JobTitle: null,
								Location: null,
								AverageSalary: 0.0,
								BottomSalary: null,		
								TopSalary: null,
								SalaryCount: 0.0,
								ResponseCount: 0.0,
								ReviewCount: 0.0,
								ReviewScore: 0.0	
							}
&lt;p&gt;;	&lt;/p&gt;

&lt;p&gt;							values.forEach(function(val) &lt;/p&gt;
{		
								agg.Company = val.Company;
								agg.JobTitle = val.JobTitle;
								agg.Location = val.Location;
		
								agg.SalaryCount += val.SalaryCount;
								agg.ResponseCount += val.ResponseCount;
								agg.ReviewCount += val.ReviewCount;
		
								if (val.AverageSalary != null)
									agg.AverageSalary += val.AverageSalary;
								if (val.BottomSalary != null &amp;amp;&amp;amp; (agg.BottomSalary == null || val.BottomSalary &amp;lt; agg.BottomSalary))
									agg.BottomSalary = val.BottomSalary;
								if (val.TopSalary != null &amp;amp;&amp;amp; (agg.TopSalary == null || val.TopSalary &amp;gt; agg.TopSalary))
									agg.TopSalary = val.TopSalary;				
								if (val.ReviewScore != null)
									agg.ReviewScore += val.ReviewScore;
							}
&lt;p&gt;);&lt;/p&gt;

&lt;p&gt;							return agg;&lt;br/&gt;
						}&lt;/p&gt;


&lt;p&gt;function Finalize(key, reduced) &lt;/p&gt;
{
							if (reduced.SalaryCount)
								reduced.AverageSalary = parseInt(reduced.AverageSalary / parseFloat(reduced.SalaryCount));
							else
								reduced.AverageSalary = null;

							if (reduced.ReviewCount)
								reduced.ReviewScore = reduced.ReviewScore / parseFloat(reduced.ReviewCount);
							else
								reduced.ReviewScore = null;
		
							return reduced;
						}</comment>
                            <comment id="86807" author="antoine" created="Thu, 9 Feb 2012 08:01:04 +0000"  >&lt;p&gt;most likely this is due to the code that restarts the entire mapreduce in case one of the shards encountered an error.&lt;br/&gt;
For example a stale shard version can happen fairly frequently.&lt;br/&gt;
In that case the 1st MR&apos;s temp collections do not get cleaned up.&lt;/p&gt;</comment>
                            <comment id="86806" author="antoine" created="Thu, 9 Feb 2012 07:58:53 +0000"  >&lt;p&gt;could you give an example mapreduce you are doing?&lt;br/&gt;
is it applied to a sharded collection, if so could you give its stats?&lt;br/&gt;
do you commonly see mapreduce errors in the logs?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="14756" name="log.zip" size="9115013" author="shane.andrade@cybercoders.com" created="Wed, 8 Feb 2012 17:28:31 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 9 Feb 2012 07:58:53 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 42 weeks, 3 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>antoine</customfieldvalue>
            <customfieldvalue>kristina</customfieldvalue>
            <customfieldvalue>shane.andrade@cybercoders.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroe1b:</customfieldvalue>

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

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

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