rethinkdb / rethinkdb_rebirth

The open-source database for the realtime web.
https://rethinkdb.com
Other
1k stars 42 forks source link

r.js timeout is broken and server stops responding #42

Open CMogilko opened 5 years ago

CMogilko commented 5 years ago

The docs https://rethinkdb.com/api/javascript/js/ say that default timeout for r.js() is 5 secs. But this query r.js("while(true) {}") doesn't timeouts. Build today from the next branch. But it works in rethinkdb-legacy.

CMogilko commented 5 years ago

It is more. After this query server doesn't respond at all. Ctrl-C can't help with stopping server. Only kill helps.

asakatida commented 5 years ago

This is an issue discussed during the migration to Duktape see #5. There is a preview hook that needs to be setup for timeouts.

asakatida commented 5 years ago

Exact fix is stubbed in code https://github.com/grandquista/rebirthdb/blob/next/src/extproc/js_job.cc#L34.