[SERVER-8053] timeoutMs was never implemented in V8Scope's invoke() or exec() Created: 01/Jan/13 Updated: 11/Jul/16 Resolved: 13/Jan/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, MapReduce |
| Affects Version/s: | 2.3.1 |
| Fix Version/s: | 2.4.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ben Becker | Assignee: | Ben Becker |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
Noticed after changing the following line to an massert(): https://github.com/mongodb/mongo/blob/master/src/mongo/scripting/engine_v8.cpp#L890 Needed for:
|
| Comments |
| Comment by auto [ 11/Jan/13 ] |
|
Author: {u'date': u'2013-01-11T22:40:10Z', u'email': u'ben.becker@10gen.com', u'name': u'Ben Becker'}Message: |
| Comment by Ben Becker [ 03/Jan/13 ] |
|
The SpiderMonkey implementation used JS_SetBranchCallback to implement timeouts. I think we have two options for v8:
The former approach seems simpler, but it's not clear if TerminateExecution() is safe to call from within this callback. It's also unclear if this is guaranteed to be called on a regular interval (e.g. in a tight loop). The latter approach is still reasonably trivial to implement. |