[SERVER-1295] mapreduce doesn't work inside db.eval Created: 24/Jun/10  Updated: 12/Jul/16  Resolved: 24/Jun/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.4.3, 1.5.3
Fix Version/s: 1.5.4

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

> db.eval( "m = function()

{ emit( this._id, 1 ); }

; r = function( k, vs )

{ return 1; }

; db.f.mapReduce( m, r );" );
Thu Jun 24 13:27:15 uncaught exception:

{ "errno" : -3, "errmsg" : "invoke failed: ", "ok" : false }

Thu Jun 24 13:27:14 Assertion: 10298:can't temprelease nested write lock
0x1000792dc 0x10003cba6 0x10006cbd2 0x1001c2ac8 0x1001dc2d5 0x1001dcd02 0x100134227 0x1001345aa 0x1001a6488 0x1001a783c 0x1001a846e 0x1000fd3b4 0x1000f3d45 0x1001246e1 0x100c96dff 0x100c9efed 0x100c96e5f 0x100ca529c 0x100c694e3 0x1001323ac
0 mongod 0x00000001000792dc _ZN5mongo15printStackTraceERSo + 36
1 mongod 0x000000010003cba6 _ZN5mongo11msgassertedEiPKc + 322
2 mongod 0x000000010006cbd2 _ZN5mongo13dbtempreleaseC1Ev + 134
3 mongod 0x00000001001c2ac8 _ZN5mongo2mr16MapReduceCommand3runERKSsRNS_7BSONObjERSsRNS_14BSONObjBuilderEb + 5756
4 mongod 0x00000001001dc2d5 _ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb + 1495
5 mongod 0x00000001001dcd02 _ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_10BufBuilderERNS_14BSONObjBuilderEbi + 1190
6 mongod 0x0000000100134227 _ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_10BufBuilderERNS_14BSONObjBuilderEbi + 67
7 mongod 0x00000001001345aa ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1 + 558
8 mongod 0x00000001001a6488 _ZN5mongoL13receivedQueryERNS_6ClientERNS_10DbResponseERNS_7MessageE + 189
9 mongod 0x00000001001a783c _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_8SockAddrE + 862
10 mongod 0x00000001001a846e _ZN5mongo14DBDirectClient4callERNS_7MessageES2_b + 116
11 mongod 0x00000001000fd3b4 _ZN5mongo14DBClientCursor4initEv + 532
12 mongod 0x00000001000f3d45 _ZN5mongo12DBClientBase5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii + 193
13 mongod 0x00000001001246e1 ZN5mongo10mongo_findEP9JSContextP8JSObjectjPlS4 + 545
14 libjs.dylib 0x0000000100c96dff js_Invoke + 2789
15 libjs.dylib 0x0000000100c9efed js_Interpret + 32101
16 libjs.dylib 0x0000000100c96e5f js_Invoke + 2885
17 libjs.dylib 0x0000000100ca529c js_InternalInvoke + 234
18 libjs.dylib 0x0000000100c694e3 JS_CallFunction + 42
19 mongod 0x00000001001323ac _ZN5mongo7SMScope6invokeEP10JSFunctionRKNS_7BSONObjEib + 548
Thu Jun 24 13:27:15 mr failed, removing collection
Thu Jun 24 13:27:15 CMD: drop test.tmp.mr.mapreduce_1277411234_1
Thu Jun 24 13:27:15 CMD: drop test.tmp.mr.mapreduce_1277411234_1_inc



 Comments   
Comment by Eliot Horowitz (Inactive) [ 24/Jun/10 ]

can't easily backport this to 1.4, but should work in 1.5 now

Comment by auto [ 24/Jun/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: don't require temprelease to work in m/r - allowing it to run from db.eval SERVER-1295
http://github.com/mongodb/mongo/commit/d5596001d25f01dd169f01ce4bb025fdd2486cc1

Generated at Thu Feb 08 02:56:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.