<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:28:28 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-12408] Map reduce temporary collection can not be removed or accessed</title>
                <link>https://jira.mongodb.org/browse/SERVER-12408</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Ran accidentally map reduce to a busy server and had to kill the client process as some client connections were not responding anymore. After killing all processes the temporary collection &apos;_purge&apos; was not removed and even after cleanly shutting down and restarting mongo it can not be removed.&lt;/p&gt;

&lt;p&gt;ubuntu@db:~$ /opt/mongodb/bin/mongo&lt;br/&gt;
MongoDB shell version: 2.4.4&lt;br/&gt;
connecting to: test&lt;br/&gt;
&amp;gt; use mydb&lt;br/&gt;
switched to db mydb&lt;br/&gt;
&amp;gt; show collections&lt;br/&gt;
_purge&lt;br/&gt;
adminmessages&lt;br/&gt;
...&lt;/p&gt;

&lt;p&gt;&amp;gt; db._purge.drop()&lt;br/&gt;
Sat Jan 18 06:12:06.024 JavaScript execution failed: TypeError: Cannot call method &apos;drop&apos; of undefined&lt;br/&gt;
&amp;gt; db&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;_purge&amp;#39;&amp;#93;&lt;/span&gt;.count()&lt;br/&gt;
Sat Jan 18 06:12:26.334 JavaScript execution failed: TypeError: Cannot call method &apos;count&apos; of undefined&lt;br/&gt;
&amp;gt; db.getCollectionNames();&lt;br/&gt;
[&lt;br/&gt;
	&quot;_purge&quot;,&lt;br/&gt;
	&quot;adminmessages&quot;,&lt;br/&gt;
        ....&lt;br/&gt;
Can see this from mongo log&lt;/p&gt;

&lt;p&gt;Sat Jan 18 04:50:54.451 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5226&amp;#93;&lt;/span&gt; CMD: drop war._purge&lt;br/&gt;
Sat Jan 18 04:50:54.566 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5226&amp;#93;&lt;/span&gt; command war.$cmd command: &lt;/p&gt;
{ drop: &quot;_purge&quot; }
&lt;p&gt; ntoreturn:1 keyUpdates:0  reslen:117 140ms&lt;br/&gt;
Sat Jan 18 04:50:54.695 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5226&amp;#93;&lt;/span&gt; command admin.$cmd command: &lt;/p&gt;
{ renameCollection: &quot;war.tmp.mr.battleinbox_118&quot;, to: &quot;war._purge&quot;, stayTemp: false }
&lt;p&gt; ntoreturn:1 keyUpdates:0  reslen:37 120ms&lt;br/&gt;
Sat Jan 18 04:50:54.714 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5226&amp;#93;&lt;/span&gt; CMD: drop war.tmp.mr.battleinbox_118&lt;br/&gt;
Sat Jan 18 04:50:54.761 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5226&amp;#93;&lt;/span&gt; CMD: drop war.tmp.mr.battleinbox_118&lt;br/&gt;
Sat Jan 18 04:50:54.761 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5226&amp;#93;&lt;/span&gt; CMD: drop war.tmp.mr.battleinbox_118_inc&lt;br/&gt;
Sat Jan 18 04:50:54.849 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5173&amp;#93;&lt;/span&gt; update war.inbox query: &lt;/p&gt;
{ read: false, uid: 202584 }
&lt;p&gt; update: { $set: &lt;/p&gt;
{ read: true }
&lt;p&gt; } nscanned:3 nupdated:2 keyUpdates:0 numYields: 1 locks(micros) w:783 107ms&lt;br/&gt;
Sat Jan 18 04:50:54.849 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn4886&amp;#93;&lt;/span&gt; insert war.mapevents ninserted:1 keyUpdates:0 locks(micros) w:435 108ms&lt;br/&gt;
Sat Jan 18 04:50:54.903 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5145&amp;#93;&lt;/span&gt; update war.battleinbox query: &lt;/p&gt;
{ read: false, uid: 212933 }
&lt;p&gt; update: { $set: &lt;/p&gt;
{ read: true }
&lt;p&gt; } nscanned:39 nupdated:21 keyUpdates:0 numYields: 2 locks(micros) w:101363 186ms&lt;br/&gt;
Sat Jan 18 04:50:54.920 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5226&amp;#93;&lt;/span&gt; CMD: drop war.tmp.mr.battleinbox_118&lt;br/&gt;
Sat Jan 18 04:50:54.931 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5226&amp;#93;&lt;/span&gt; CMD: drop war.tmp.mr.battleinbox_118_inc&lt;br/&gt;
Sat Jan 18 04:50:55.131 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5136&amp;#93;&lt;/span&gt; query war.users query: &lt;/p&gt;
{ gcid: &quot;G:625654150&quot;, account_type: 6 }
&lt;p&gt; ntoreturn:1 ntoskip:0 nscanned:112460 keyUpdates:0 numYields: 251 locks(micros) r:1113617 nreturned:0 reslen:20 1933ms&lt;br/&gt;
Sat Jan 18 04:50:55.135 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5226&amp;#93;&lt;/span&gt; command war.$cmd command: { mapreduce: &quot;battleinbox&quot;, map: &lt;br/&gt;
    function() &lt;/p&gt;
{
       emit(this.uid, 1);
    }
&lt;p&gt;, reduce: &lt;br/&gt;
    function(key, values) &lt;/p&gt;
{
       return Array.sum(values);
    }
&lt;p&gt;, out: &quot;_purge&quot; } ntoreturn:1 keyUpdates:0 numYields: 69182 locks(micros) W:302844 r:1682304504 w:28452182 reslen:130 1952453ms&lt;/p&gt;

&lt;p&gt;...&lt;br/&gt;
Sat Jan 18 04:53:18.628 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn5226&amp;#93;&lt;/span&gt; getmore war._purge cursorid:3953529293811394301 ntoreturn:0 k&lt;br/&gt;
eyUpdates:0 numYields: 23 locks(micros) r:119699 nreturned:56952 reslen:1879436 134ms&lt;/p&gt;

</description>
                <environment>&lt;a href=&apos;mailto:ubuntu@db&apos;&gt;ubuntu@db&lt;/a&gt;:~$ uname -a&lt;br/&gt;
Linux ip-10-104-157-132 3.2.0-56-virtual #86-Ubuntu SMP Wed Oct 23 09:43:22 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux&lt;br/&gt;
&lt;br/&gt;
Amazon EC2 with EBS</environment>
        <key id="106640">SERVER-12408</key>
            <summary>Map reduce temporary collection can not be removed or accessed</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="9">Done</resolution>
                                        <assignee username="stephen.steneker@mongodb.com">Stennie Steneker</assignee>
                                    <reporter username="tikonen">Teemu Ikonen</reporter>
                        <labels>
                    </labels>
                <created>Sat, 18 Jan 2014 06:21:26 +0000</created>
                <updated>Mon, 11 Jul 2016 17:18:22 +0000</updated>
                            <resolved>Mon, 17 Mar 2014 12:51:25 +0000</resolved>
                                    <version>2.4.4</version>
                                                    <component>MapReduce</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="518182" author="tikonen" created="Tue, 18 Mar 2014 08:25:13 +0000"  >&lt;p&gt;Hi, the .stats() command works fine when called like in your example. I&apos;ll try to drop the collection when we have next maintenance break. Thanks!&lt;/p&gt;

&lt;p&gt;&amp;gt; db.getCollection(&apos;_purge&apos;).stats()&lt;br/&gt;
{&lt;br/&gt;
	&quot;ns&quot; : &quot;mydb._purge&quot;,&lt;br/&gt;
	&quot;count&quot; : 57053,&lt;br/&gt;
	&quot;size&quot; : 2053916,&lt;br/&gt;
	&quot;avgObjSize&quot; : 36.00014022049673,&lt;br/&gt;
	&quot;storageSize&quot; : 3825664,&lt;br/&gt;
	&quot;numExtents&quot; : 5,&lt;br/&gt;
	&quot;nindexes&quot; : 1,&lt;br/&gt;
	&quot;lastExtentSize&quot; : 2883584,&lt;br/&gt;
	&quot;paddingFactor&quot; : 1,&lt;br/&gt;
	&quot;systemFlags&quot; : 1,&lt;br/&gt;
	&quot;userFlags&quot; : 0,&lt;br/&gt;
	&quot;totalIndexSize&quot; : 1594320,&lt;br/&gt;
	&quot;indexSizes&quot; : &lt;/p&gt;
{
		&quot;_id_&quot; : 1594320
	}
&lt;p&gt;,&lt;br/&gt;
	&quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="517291" author="stennie" created="Mon, 17 Mar 2014 12:51:25 +0000"  >&lt;p&gt;Hi Teemu,&lt;/p&gt;

&lt;p&gt;Thanks for the update. I&apos;m going to close this issue, as the suggested syntax should work with the given collection name (I tested on MongoDB 2.4.9).&lt;/p&gt;

&lt;p&gt;If you want to test with a non-destructive command you could use:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.getCollection(&apos;_purge&apos;).stats()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Please feel free to reopen if you have any further questions on this issue.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Stephen&lt;/p&gt;</comment>
                            <comment id="517284" author="tikonen" created="Mon, 17 Mar 2014 11:43:10 +0000"  >&lt;p&gt;I have not touched it since. Database is in production and this does not seem to cause any problems so I rather not try to do anything about it.&lt;/p&gt;</comment>
                            <comment id="517245" author="stennie" created="Mon, 17 Mar 2014 07:23:32 +0000"  >&lt;p&gt;Hi Teemu,&lt;/p&gt;

&lt;p&gt;Were you able to drop the &lt;tt&gt;_purge&lt;/tt&gt; collection?&lt;/p&gt;

&lt;p&gt;FYI, the following syntax should work from the &lt;tt&gt;mongo&lt;/tt&gt; shell:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.getCollection(&apos;_purge&apos;).drop()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Stephen&lt;/p&gt;</comment>
                            <comment id="485651" author="tikonen" created="Wed, 22 Jan 2014 16:18:56 +0000"  >&lt;p&gt;Yes I have, but it&apos;s 14MB compressed and it might contain user sensitive data. I could put them on one our sites and give privately url to you for downloading,&lt;/p&gt;

&lt;p&gt;What happened exactly was that cleanup tool did first map reduce, and then started removing individual documents in batches by _id using the results from map reduce.&lt;/p&gt;</comment>
                            <comment id="485548" author="dan@10gen.com" created="Wed, 22 Jan 2014 14:10:49 +0000"  >&lt;p&gt;Do you have the mongod log from the period when the map/reduce was killed?&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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 22 Jan 2014 14:10:49 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 48 weeks, 1 day 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>
                            9 years, 48 weeks, 1 day 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>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>stephen.steneker@mongodb.com</customfieldvalue>
            <customfieldvalue>tikonen</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrm3lj:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>104217</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Can not reproduce.&lt;/p&gt;</customfieldvalue>

                        </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|hsozrb:</customfieldvalue>

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