You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2020/01/06 18:27:03 UTC
[couchdb] 03/19: Fallback to direct I/O if ioq is not running
This is an automated email from the ASF dual-hosted git repository.
kocolosk pushed a commit to branch ioq-in-tree
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit c7f9ad1c0f77b601aa456e62c963793d517c1026
Author: Robert Newson <rn...@apache.org>
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")),