[SERVER-8963] 10gen custom types not defined in Spidermonkey mapReduce context or $where query context Created: 13/Mar/13  Updated: 10/Dec/14  Resolved: 03/May/13

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

Type: Bug Priority: Major - P3
Reporter: Shaun Verch Assignee: Shaun Verch
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Example in mapReduce context:

> db.mr.mapReduce(function() { emit("test",ObjectId()) }, function ( k , v ) { return { test : ObjectId() } }, { out : "mr_out" })
Tue Mar 12 19:17:34.004 [conn1] CMD: drop test.tmp.mr.mr_0
Tue Mar 12 19:17:34.004 [conn1] CMD: drop test.tmp.mr.mr_0_inc
Tue Mar 12 19:17:34.005 [conn1] build index test.tmp.mr.mr_0_inc { 0: 1 }
Tue Mar 12 19:17:34.006 [conn1] build index done.  scanned 0 total records. 0.001 secs
Tue Mar 12 19:17:34.006 [conn1] build index test.tmp.mr.mr_0 { _id: 1 }
Tue Mar 12 19:17:34.007 [conn1] build index done.  scanned 0 total records. 0 secs
Tue Mar 12 19:17:34.007 [conn1] JS Error: ReferenceError: ObjectId is not defined nofile_b:1
Tue Mar 12 19:17:34.009 [conn1] CMD: drop test.tmp.mr.mr_0
Tue Mar 12 19:17:34.010 [conn1] CMD: drop test.tmp.mr.mr_0_inc
Tue Mar 12 19:17:34.010 [conn1] mr failed, removing collection :: caused by :: 9014 map invoke failed: JS Error: ReferenceError: ObjectId is not defined nofile_b:1
Tue Mar 12 19:17:34.011 [conn1] CMD: drop test.tmp.mr.mr_0
Tue Mar 12 19:17:34.011 [conn1] CMD: drop test.tmp.mr.mr_0_inc
Tue Mar 12 19:17:34.013 uncaught exception: map reduce failed:{
	"errmsg" : "exception: map invoke failed: JS Error: ReferenceError: ObjectId is not defined nofile_b:1",
	"code" : 9014,
	"ok" : 0
}
>

Example in $where context:

> db.test.find({$where:"this.x==ObjectId()"})
Tue Mar 12 19:19:45.666 [conn1] JS Error: ReferenceError: ObjectId is not defined nofile_a:0
Tue Mar 12 19:19:45.666 [conn1] assertion 10071 error on invocation of $where function:
JS Error: ReferenceError: ObjectId is not defined nofile_a:0 ns:test.test query:{ $where: "this.x==ObjectId()" }
error: {
	"$err" : "error on invocation of $where function:\nJS Error: ReferenceError: ObjectId is not defined nofile_a:0",
	"code" : 10071
}
>

Also a problem with DBRef, DBPointer, BinData, and Timestamp



 Comments   
Comment by auto [ 29/Mar/13 ]

Author:

{u'date': u'2013-03-13T02:34:46Z', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-8963 Skip some constructor validity tests that fail on Spidermonkey
Branch: master
https://github.com/mongodb/mongo/commit/d8d85cb268995cd6561156ab595c44d3fab9565b

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