I filed https://issues.apache.org/jira/browse/COUCHDB-2013 for this.

The patch will be a little more involved than just changing the prompt function 
as the run method does not respect the timeout for many of its clauses. While 
changing the gen_server call to infinity is an easy fix it removes any upper 
limit on execution time of a map or reduce function. Perhaps that’s fine, maybe 
we allow native processes to take forever (in which case we should remove all 
the existing timeout plumbing), but I can’t quite convince myself of that.

On 20 Dec 2013, at 15:10, Adam Kocoloski <kocol...@apache.org> wrote:

> Hey folks, back to the original question, the native process gen_server 
> respects the timeout internally but the public API in the module still makes 
> a gen_server:call with the default 5 second timeout:
> 
> https://github.com/apache/couchdb/blob/1.5.0/src/couchdb/couch_native_process.erl#L62-L63
> 
> Contrast this with the OS process version where it sets the timeout on the 
> client call to infinity (thus leaving it to the server to control the flow):
> 
> https://github.com/apache/couchdb/blob/1.5.0/src/couchdb/couch_os_process.erl#L51-L58
> 
> Teaching the native_process API to do the same would be a welcome change.  Is 
> there a JIRA for this one already?
> 
> Adam
> 

Reply via email to