This is an automated email from the ASF dual-hosted git repository. chewbranca pushed a commit to branch ioq-per-shard-or-user in repository https://gitbox.apache.org/repos/asf/couchdb-ioq.git
commit c7f9ad1c0f77b601aa456e62c963793d517c1026 Author: Robert Newson <[email protected]> AuthorDate: Fri Sep 5 18:22:44 2014 +0100 Fallback to direct I/O if ioq is not running --- src/ioq.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ioq.erl b/src/ioq.erl index 4983b73..b761a0b 100644 --- a/src/ioq.erl +++ b/src/ioq.erl @@ -37,7 +37,12 @@ start_link() -> call(Fd, Msg, Priority) -> Request = #request{fd=Fd, msg=Msg, priority=Priority, from=self()}, - gen_server:call(?MODULE, Request, infinity). + try + gen_server:call(?MODULE, Request, infinity) + catch + exit:{noproc,_} -> + gen_server:call(Fd, Msg, infinity) + end. init(_) -> Ratio = list_to_float(config:get("ioq", "ratio", "0.01")),
