You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ji...@apache.org on 2025/09/09 19:53:00 UTC
(couchdb-ioq) branch add-error-handling-for-noproc created (now 6dd1925)
This is an automated email from the ASF dual-hosted git repository.
jiahuili430 pushed a change to branch add-error-handling-for-noproc
in repository https://gitbox.apache.org/repos/asf/couchdb-ioq.git
at 6dd1925 Add error handling for `noproc`
This branch includes the following new commits:
new 6dd1925 Add error handling for `noproc`
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(couchdb-ioq) 01/01: Add error handling for `noproc`
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jiahuili430 pushed a commit to branch add-error-handling-for-noproc
in repository https://gitbox.apache.org/repos/asf/couchdb-ioq.git
commit 6dd192597b38532e2224b8c8a25c826e815ced75
Author: Jiahui Li <li...@gmail.com>
AuthorDate: Tue Sep 9 14:51:20 2025 -0500
Add error handling for `noproc`
Related PR:
- https://github.com/apache/couchdb/pull/5635
- https://github.com/apache/couchdb/pull/5636
---
src/ioq_server.erl | 7 ++++++-
src/ioq_server2.erl | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/ioq_server.erl b/src/ioq_server.erl
index 80d9612..c817c65 100644
--- a/src/ioq_server.erl
+++ b/src/ioq_server.erl
@@ -78,7 +78,12 @@ call(Fd, Msg, Priority) ->
class = Class,
t0 = erlang:monotonic_time()
},
- gen_server:call(?MODULE, Request, infinity)
+ try
+ gen_server:call(?MODULE, Request, infinity)
+ catch
+ exit:{noproc, _} ->
+ gen_server:call(Fd, Msg, infinity)
+ end
end.
bypass(_Msg, Priority) ->
diff --git a/src/ioq_server2.erl b/src/ioq_server2.erl
index 39aa8f4..c2fc215 100644
--- a/src/ioq_server2.erl
+++ b/src/ioq_server2.erl
@@ -118,7 +118,12 @@ call_int(Fd, Msg, Dimensions, IOType) ->
},
Req = add_request_dimensions(Req0, Dimensions),
Server = ioq_server(Req, IOType),
- gen_server:call(Server, Req, infinity)
+ try
+ gen_server:call(Server, Req, infinity)
+ catch
+ exit:{noproc, _} ->
+ gen_server:call(Fd, Msg, infinity)
+ end
end.
ioq_server(#ioq_request{}, search) ->