<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:03:19 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-3529] Sharded map reduce using merge stalls recreating indexes on the output collection.</title>
                <link>https://jira.mongodb.org/browse/SERVER-3529</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Steps to reproduce:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Create a sharded cluster of two replica sets.&lt;/li&gt;
	&lt;li&gt;Shard a database called &apos;delicious&apos;.&lt;/li&gt;
	&lt;li&gt;Shard a collection called &apos;links&apos; sharded on &apos;author&apos;&lt;/li&gt;
	&lt;li&gt;Load the data from this link into the sharded collection:&lt;br/&gt;
&lt;a href=&quot;http://www.infochimps.com/link_frame?dataset=13364&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.infochimps.com/link_frame?dataset=13364&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Run the attached python script twice.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Results:&lt;/p&gt;

&lt;p&gt;The script will complete on the first run no problems. It will get stuck on the second run when the server is trying to recreate indexes on the output collection. The python script will eventually fail with the following assertion:&lt;/p&gt;

&lt;p&gt;failed: final reduce failed: &lt;/p&gt;
{ result: &quot;results&quot;, assertion: &quot;getMore: cursor didn&apos;t exist on server, possible restart or timeout?&quot;, assertionCode: 13127, errmsg: &quot;db assertion failure&quot;, ok: 0.0 }


&lt;p&gt;Before the script fails db.currentOp() will show the following with the seconds climbing:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
	&quot;opid&quot; : &quot;repl0:1216193&quot;,&lt;br/&gt;
	&quot;active&quot; : true,&lt;br/&gt;
	&quot;lockType&quot; : &quot;write&quot;,&lt;br/&gt;
	&quot;waitingForLock&quot; : false,&lt;br/&gt;
	&quot;secs_running&quot; : 336,&lt;br/&gt;
	&quot;op&quot; : &quot;query&quot;,&lt;br/&gt;
	&quot;ns&quot; : &quot;delicious.results&quot;,&lt;br/&gt;
	&quot;query&quot; : &lt;/p&gt;
{
		&quot;$msg&quot; : &quot;query not recording (too large)&quot;
	}
&lt;p&gt;,&lt;br/&gt;
	&quot;client_s&quot; : &quot;127.0.0.1:36127&quot;,&lt;br/&gt;
	&quot;desc&quot; : &quot;conn&quot;,&lt;br/&gt;
	&quot;msg&quot; : &quot;index: (3/3) btree-middle&quot;&lt;br/&gt;
},&lt;/p&gt;

&lt;p&gt;Here&apos;s the sharding info:&lt;/p&gt;

&lt;p&gt;&amp;gt; db.printShardingStatus()&lt;br/&gt;
&amp;#8212; Sharding Status &amp;#8212; &lt;br/&gt;
  sharding version: &lt;/p&gt;
{ &quot;_id&quot; : 1, &quot;version&quot; : 3 }
&lt;p&gt;  shards:&lt;/p&gt;
	{  &quot;_id&quot; : &quot;repl0&quot;,  &quot;host&quot; : &quot;repl0/behackett-dt:29017&quot; }
	{  &quot;_id&quot; : &quot;repl1&quot;,  &quot;host&quot; : &quot;repl1/behackett-dt:29020&quot; }
&lt;p&gt;  databases:&lt;/p&gt;
	{  &quot;_id&quot; : &quot;admin&quot;,  &quot;partitioned&quot; : false,  &quot;primary&quot; : &quot;config&quot; }
	{  &quot;_id&quot; : &quot;delicious&quot;,  &quot;partitioned&quot; : true,  &quot;primary&quot; : &quot;repl0&quot; }
&lt;p&gt;		delicious.links chunks:&lt;br/&gt;
				repl1	12&lt;br/&gt;
				repl0	13&lt;br/&gt;
			too many chunks to print, use verbose if you want to force print&lt;/p&gt;
</description>
                <environment>Linux x86_64</environment>
        <key id="20466">SERVER-3529</key>
            <summary>Sharded map reduce using merge stalls recreating indexes on the output collection.</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="antoine">Antoine Girbal</assignee>
                                    <reporter username="bernie@mongodb.com">Bernie Hackett</reporter>
                        <labels>
                            <label>mapreduce,</label>
                    </labels>
                <created>Wed, 3 Aug 2011 20:42:33 +0000</created>
                <updated>Tue, 12 Jul 2016 00:17:59 +0000</updated>
                            <resolved>Tue, 30 Aug 2011 06:16:40 +0000</resolved>
                                    <version>1.8.2</version>
                                    <fixVersion>1.8.4</fixVersion>
                                    <component>MapReduce</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="51396" author="auto" created="Tue, 30 Aug 2011 06:15:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3529&quot; title=&quot;Sharded map reduce using merge stalls recreating indexes on the output collection.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3529&quot;&gt;&lt;del&gt;SERVER-3529&lt;/del&gt;&lt;/a&gt;: Sharded map reduce using merge stalls recreating indexes on the output collection&lt;br/&gt;
Branch: v1.8&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f3bd113e0df642703fda8cc9fe7f6cdf6503e5e8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f3bd113e0df642703fda8cc9fe7f6cdf6503e5e8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="51388" author="eliot" created="Tue, 30 Aug 2011 04:44:53 +0000"  >&lt;p&gt;Ok - so can you apply patch on 1.8&lt;/p&gt;</comment>
                            <comment id="51387" author="antoine" created="Tue, 30 Aug 2011 04:42:08 +0000"  >&lt;p&gt;issue does not exist in 2.0 line due to refactoring.&lt;br/&gt;
This fix is only for 1.8.&lt;/p&gt;</comment>
                            <comment id="51386" author="eliot" created="Tue, 30 Aug 2011 04:37:03 +0000"  >&lt;p&gt;Can you confirm is this is an issue in 2.0 or only 1.8?&lt;/p&gt;</comment>
                            <comment id="48933" author="antoine" created="Wed, 17 Aug 2011 00:10:06 +0000"  >&lt;p&gt;diff that fixes 1.8&lt;/p&gt;</comment>
                            <comment id="48684" author="antoine" created="Mon, 15 Aug 2011 21:32:41 +0000"  >&lt;p&gt;I have to confirm but I think this issue is only in 1.8.&lt;br/&gt;
There is a bug in 1.8 where the index created is &quot;0&quot; instead of &quot;_id&quot; on output collection.&lt;br/&gt;
This obviously makes it painful for MERGE or REDUCE.&lt;/p&gt;</comment>
                            <comment id="46203" author="behackett" created="Wed, 3 Aug 2011 20:48:40 +0000"  >&lt;p&gt;Probably obvious but you need pymongo to run the script.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="12706" name="SERVER-3529.diff" size="1185" author="antoine" created="Wed, 17 Aug 2011 00:10:06 +0000"/>
                            <attachment id="12479" name="mr_test.py" size="983" author="bernie@mongodb.com" created="Wed, 3 Aug 2011 20:42:34 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 15 Aug 2011 21:32:41 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 25 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>
                            12 years, 25 weeks, 1 day ago
                        </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>antoine</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>bernie@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|hroulz:</customfieldvalue>

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

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

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