You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2021/09/07 22:14:23 UTC
[couchdb-ioq] branch ioq-per-shard-or-user updated: Support
Clouseau pids
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
The following commit(s) were added to refs/heads/ioq-per-shard-or-user by this push:
new 1a69739 Support Clouseau pids
1a69739 is described below
commit 1a69739f4abe87498bdcf183b058791e94ae9ed8
Author: Russell Branca <ch...@apache.org>
AuthorDate: Tue Sep 7 15:13:50 2021 -0700
Support Clouseau pids
---
src/ioq_server2.erl | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/ioq_server2.erl b/src/ioq_server2.erl
index 3cedeed..71be787 100644
--- a/src/ioq_server2.erl
+++ b/src/ioq_server2.erl
@@ -115,6 +115,14 @@ call_int({Name, Node}=Server, #ioq_request{msg=Msg}=Req) when is_atom(Name) anda
%% TODO: add dedicated clouseau IOQ pid
gen_server:call(ioq_server2, Req, infinity)
end;
+call_int(Pid, #ioq_request{msg=Msg}=Req) when is_pid(Pid) ->
+ case should_bypass(Req) of
+ true ->
+ gen_server:call(Pid, Msg, infinity);
+ false ->
+ %% TODO: add dedicated clouseau IOQ pid
+ gen_server:call(ioq_server2, Req, infinity)
+ end;
call_int(#ioq_file{ioq=undefined, fd=Fd}, #ioq_request{msg=Msg}=Req) ->
Class = atom_to_list(Req#ioq_request.class),
case config:get_boolean("ioq2.bypass", Class, false) of