diff options
author | Sean Hudgston <shudgst@us.ibm.com> | 2022-07-13 17:03:59 -0400 |
---|---|---|
committer | Russell Branca <chewbranca@apache.org> | 2022-07-25 15:48:10 -0700 |
commit | 2be1da823e10287c24591427e86f737abc0e483a (patch) | |
tree | 6bb4e15845ee39d8bf773a6f50f715677d48d896 | |
parent | a45e82aa1a5efed10bfe97fcfdc53ee5d5fc689f (diff) | |
download | couchdb-2be1da823e10287c24591427e86f737abc0e483a.tar.gz |
Add io_priority classes
- chhtpd_auth_cache
- couch_index
-rw-r--r-- | src/chttpd/src/chttpd_auth_cache.erl | 6 | ||||
-rw-r--r-- | 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 |