summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Branca <chewbranca@gmail.com>2019-04-18 14:21:17 -0700
committerGitHub <noreply@github.com>2019-04-18 14:21:17 -0700
commit2fcfb6ba9d7b79321327e5c6eed7465dd20940d3 (patch)
treefa358674f1fac6b39fe6e0be95dde502b704fd5d
parent7083d1ec2587a44e568b3d87c82d6a03209d8c64 (diff)
parent48edbf38ae8f6fb07d2e61351fbabf70826ad3c7 (diff)
downloadcouchdb-2fcfb6ba9d7b79321327e5c6eed7465dd20940d3.tar.gz
Merge pull request #46 from cloudant-labs/use-dedicated-search-ioq-channel
Use dedicated search IOQ channel for
-rw-r--r--priv/stats_descriptions.cfg6
-rw-r--r--src/dreyfus_index_updater.erl2
-rw-r--r--src/dreyfus_rpc.erl6
3 files changed, 10 insertions, 4 deletions
diff --git a/priv/stats_descriptions.cfg b/priv/stats_descriptions.cfg
index fc98b9d95..1cf49a3dc 100644
--- a/priv/stats_descriptions.cfg
+++ b/priv/stats_descriptions.cfg
@@ -51,3 +51,9 @@
{type, histogram},
{desc, <<"length of an dreyfus_index info request">>}
]}.
+
+%% Declare IOQ2 search channel metrics
+{[couchdb, io_queue2, search, count], [
+ {type, counter},
+ {desc, <<"Search IO directly triggered by client requests">>}
+]}.
diff --git a/src/dreyfus_index_updater.erl b/src/dreyfus_index_updater.erl
index 40fd0c377..3720cb63c 100644
--- a/src/dreyfus_index_updater.erl
+++ b/src/dreyfus_index_updater.erl
@@ -28,7 +28,7 @@ update(IndexPid, Index) ->
ddoc_id = DDocId,
name = IndexName
} = Index,
- erlang:put(io_priority, {view_update, DbName, IndexName}),
+ erlang:put(io_priority, {search, DbName, IndexName}),
{ok, Db} = couch_db:open_int(DbName, []),
try
TotalUpdateChanges = couch_db:count_changes_since(Db, CurSeq),
diff --git a/src/dreyfus_rpc.erl b/src/dreyfus_rpc.erl
index 97a0526a9..5542bd029 100644
--- a/src/dreyfus_rpc.erl
+++ b/src/dreyfus_rpc.erl
@@ -38,7 +38,7 @@ group2(DbName, DDoc, IndexName, QueryArgs) ->
call(Fun, DbName, DDoc, IndexName, QueryArgs0) ->
QueryArgs = dreyfus_util:upgrade(QueryArgs0),
- erlang:put(io_priority, {interactive, DbName}),
+ erlang:put(io_priority, {search, DbName}),
check_interactive_mode(),
{ok, Db} = get_or_create_db(DbName, []),
#index_query_args{
@@ -75,7 +75,7 @@ info(DbName, DDoc, IndexName) ->
dreyfus_util:time([rpc, info], MFA).
info_int(DbName, DDoc, IndexName) ->
- erlang:put(io_priority, {interactive, DbName}),
+ erlang:put(io_priority, {search, DbName}),
check_interactive_mode(),
case dreyfus_index:design_doc_to_index(DDoc, IndexName) of
{ok, Index} ->
@@ -91,7 +91,7 @@ info_int(DbName, DDoc, IndexName) ->
end.
disk_size(DbName, DDoc, IndexName) ->
- erlang:put(io_priority, {interactive, DbName}),
+ erlang:put(io_priority, {search, DbName}),
check_interactive_mode(),
case dreyfus_index:design_doc_to_index(DDoc, IndexName) of
{ok, Index} ->