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 2022/07/13 21:15:36 UTC
[couchdb] branch 4101-add-io-priority created (now d0b84824b)
This is an automated email from the ASF dual-hosted git repository.
chewbranca pushed a change to branch 4101-add-io-priority
in repository https://gitbox.apache.org/repos/asf/couchdb.git
at d0b84824b Add io_priority classes
This branch includes the following new commits:
new d0b84824b Add io_priority classes
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] 01/01: Add io_priority classes
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chewbranca pushed a commit to branch 4101-add-io-priority
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit d0b84824b5ccce91db62987c2922b61d0f17dfa3
Author: Sean Hudgston <sh...@us.ibm.com>
AuthorDate: Wed Jul 13 17:03:59 2022 -0400
Add io_priority classes
- chhtpd_auth_cache
- couch_index
---
src/chttpd/src/chttpd_auth_cache.erl | 6 ++++--
src/couch_index/src/couch_index.erl | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/chttpd/src/chttpd_auth_cache.erl b/src/chttpd/src/chttpd_auth_cache.erl
index 2173eca95..e47d02fb9 100644
--- a/src/chttpd/src/chttpd_auth_cache.erl
+++ b/src/chttpd/src/chttpd_auth_cache.erl
@@ -155,7 +155,9 @@ spawn_changes(Since) ->
Pid.
listen_for_changes(Since) ->
- ensure_auth_ddoc_exists(dbname(), <<"_design/_auth">>),
+ DbName = dbname(),
+ erlang:put(io_priority, {system, DbName}),
+ ensure_auth_ddoc_exists(DbName, <<"_design/_auth">>),
CBFun = fun ?MODULE:changes_callback/2,
Args = #changes_args{
feed = "continuous",
@@ -163,7 +165,7 @@ listen_for_changes(Since) ->
heartbeat = true,
filter = {default, main_only}
},
- fabric:changes(dbname(), CBFun, Since, Args).
+ fabric:changes(DbName, CBFun, Since, Args).
changes_callback(waiting_for_updates, Acc) ->
{ok, Acc};
diff --git a/src/couch_index/src/couch_index.erl b/src/couch_index/src/couch_index.erl
index a6b62be7c..c67abc969 100644
--- a/src/couch_index/src/couch_index.erl
+++ b/src/couch_index/src/couch_index.erl
@@ -72,6 +72,7 @@ get_compactor_pid(Pid) ->
init({Mod, IdxState}) ->
DbName = Mod:get(db_name, IdxState),
+ erlang:put(io_priority, {view_update, DbName}),
erlang:send_after(?CHECK_INTERVAL, self(), maybe_close),
Resp = couch_util:with_db(DbName, fun(Db) ->
case Mod:open(Db, IdxState) of