[SERVER-1400] Array.sum doesn't work in final reduce Created: 12/Jul/10  Updated: 12/Jul/16  Resolved: 22/Jul/10

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 1.5.6

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn 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   

> function map()

{ emit('count', 1); }

> function reduce(key, values)

{ return Array.sum(values) }

> out = db.foo.mapReduce(map, reduce)
Mon Jul 12 13:20:06 uncaught exception: map reduce failed: {
"ok" : 0,
"errmsg" : "final reduce failed:

{ result: \"tmp.mr.mapreduce_1278955206_2\", assertion: \"invoke failed: JS Error: TypeError: Array.sum is not a function nofile_b:1\", assertionCode: 9004, errmsg: \"db assertion failure\", ok: 0.0 }

"
}



 Comments   
Comment by auto [ 22/Jul/10 ]

Author:

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

Message: fix final reduce scoping SERVER-1400
http://github.com/mongodb/mongo/commit/1c2758bf881ebfdebda02185a70709c21da72542

Comment by auto [ 22/Jul/10 ]

Author:

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

Message: broken test for SERVER-1400
http://github.com/mongodb/mongo/commit/7eaaa12cc64f410687cb98ce5db12f394d80a031

Comment by auto [ 22/Jul/10 ]

Author:

{'login': 'kreuter', 'name': 'Richard Kreuter', 'email': 'richard@10gen.com'}

Message: Add a test for SERVER-1400.
http://github.com/mongodb/mongo/commit/cd913168fbb1ba8e8fa32e1e577409b8bfc0f39f

Comment by Richard Kreuter (Inactive) [ 21/Jul/10 ]

M3: [conn2] Wed Jul 21 18:52:37 Assertion: 13388:shard version not ok in Client::Context: your version is too old ns: test.foo global: 4|3 client: 4|1
M3: 0x100031c4e 0x100086ba6 0x10017eaa4 0x1002b18a5 0x1002ad915 0x1002ae6c8 0x10017fc48 0x100182bc6 0x100255ad3 0x100259887 0x10025a2bf 0x100128cdd 0x10011118d 0x10011748e 0x100125646 0x100121bfe 0x10027ff64 0x1002ad54b 0x1002ae6c8 0x10017fc48

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