[SERVER-387] currentOp() and killOp() don't work right with db.eval() Created: 26/Oct/09  Updated: 12/Jul/16  Resolved: 17/Mar/11

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

Type: Bug Priority: Minor - P4
Reporter: Dwight Merriman Assignee: Aaron Staple
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-1610 curop seg fault Closed
depends on SERVER-1816 killop not robust Closed
depends on SERVER-1840 in v8, can't do a $where with a funct... Closed
depends on SERVER-1841 in spidermonkey js impl, killop can b... Closed
depends on SERVER-1844 killop does not work for nested ops Closed
depends on SERVER-1900 v8 Issue 708 Closed
depends on SERVER-2076 killall may fail in v8 Closed
depends on SERVER-2225 when multiple map reduce jobs are run... Closed
Related
is related to SERVER-1931 curop should show op num of parent ops Closed
Participants:

 Description   

currentOp() doesn't indicate an eval is in progress.

killOp() won't kill it either.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 17/Mar/11 ]

resolving this as most of this is fixed and the rest of addressed by linked cases

Comment by auto [ 20/Dec/10 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-387 fix mr_killop test by including new required 'out' field
https://github.com/mongodb/mongo/commit/30dc89337b46d28b302e3e28939b4d95afa05961

Comment by auto [ 14/Dec/10 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-387 test killop with map reduce
https://github.com/mongodb/mongo/commit/8e73062d8892089b948a25a42f828c9b861e623e

Comment by auto [ 06/Oct/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-387 clean test
http://github.com/mongodb/mongo/commit/2c041513a0bdbbfd696d43bd58e95adbc946c9bc

Comment by auto [ 23/Sep/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-387 reduce test timeouts
http://github.com/mongodb/mongo/commit/5d9149a33ae066d08fb1a46671163bb3f9cad9de

Comment by auto [ 23/Sep/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-387 enable interrupts for v8
http://github.com/mongodb/mongo/commit/d2249cdf68eef2c954630b9cfd24643d06b4d8be

Comment by auto [ 20/Sep/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-387 fix test race condition
http://github.com/mongodb/mongo/commit/bfb2e634611962d40125f0ad34f47d145658d78d

Comment by Aaron Staple [ 15/Sep/10 ]

Also, a note to myself, since the 'shell utils' aren't installed for server side js we don't need to worry about implementing a killop interrupt for the sleep command.

Comment by Aaron Staple [ 15/Sep/10 ]

It looks like we can do this in v8 by enabling v8 mutex preemption and then running a separate thread which periodically checks for timeouts and killop interrupts and kills pertinent v8 threads as needed using v8::TerminateExecution.

Comment by Eliot Horowitz (Inactive) [ 15/Sep/10 ]

Can you figure out how we might do it?
I would kind of like to switch to v8 - but this is important.

Comment by Aaron Staple [ 15/Sep/10 ]

Implementing in spidermonkey was relatively easy because we already had some callbacks in place for quota timeouts. The v8 engine has no such callbacks enabled currently. Please let me know if I should implement the killop behavior for v8 as well.

Comment by auto [ 15/Sep/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-387 support killop with db.eval
http://github.com/mongodb/mongo/commit/8c82a9c5c62966093acd4e2a29572fa48fef707b

Comment by Eliot Horowitz (Inactive) [ 09/Aug/10 ]

I think that field is new - this case is very old

Comment by Aaron Staple [ 09/Aug/10 ]

How should currentOp indicate an eval is in progress? It looks like the query field already contains an $eval subfield if there is a db.eval happening.

Comment by auto [ 16/Mar/10 ]

Author:

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

Message: make killOp work for map reduce SERVER-387
http://github.com/mongodb/mongo/commit/c09ded578037bab3cd1d3ac6b215cda001f2c899

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