You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2022/11/16 18:38:30 UTC

[couchdb] branch set-compaction-io-priority-for-shard-splits created (now 0c7268f9c)

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch set-compaction-io-priority-for-shard-splits
in repository https://gitbox.apache.org/repos/asf/couchdb.git


      at 0c7268f9c Use compaction ioq priority for shard splitting

This branch includes the following new commits:

     new 0c7268f9c Use compaction ioq priority for shard splitting

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: Use compaction ioq priority for shard splitting

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch set-compaction-io-priority-for-shard-splits
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 0c7268f9c189df18c83817e2486120640a079061
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Wed Nov 16 13:36:53 2022 -0500

    Use compaction ioq priority for shard splitting
    
    Db shard copy uses `db_compact` priority and view building uses `view_compact`
    priority to avoid inventing new priority levels.
---
 src/mem3/src/mem3_reshard_index.erl | 4 +++-
 src/mem3/src/mem3_reshard_job.erl   | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mem3/src/mem3_reshard_index.erl b/src/mem3/src/mem3_reshard_index.erl
index fa0a101b5..54cb08ebe 100644
--- a/src/mem3/src/mem3_reshard_index.erl
+++ b/src/mem3/src/mem3_reshard_index.erl
@@ -103,7 +103,9 @@ hastings_indices(DbName, Doc) ->
             []
     end.
 
-build_index({?MRVIEW, _DbName, MRSt} = Ctx, Try) ->
+build_index({?MRVIEW, DbName, MRSt} = Ctx, Try) ->
+    IdxName = couch_mrview_index:get(idx_name, MRSt),
+    ioq:set_io_priority({view_compact, DbName, IdxName}),
     await_retry(
         couch_index_server:get_index(couch_mrview_index, MRSt),
         fun couch_index:get_state/2,
diff --git a/src/mem3/src/mem3_reshard_job.erl b/src/mem3/src/mem3_reshard_job.erl
index a9fb48134..1be74dfba 100644
--- a/src/mem3/src/mem3_reshard_job.erl
+++ b/src/mem3/src/mem3_reshard_job.erl
@@ -367,6 +367,7 @@ initial_copy_impl(#job{source = Source, target = Targets0} = Job) ->
     #shard{name = SourceName} = Source,
     Targets = [{R, N} || #shard{range = R, name = N} <- Targets0],
     TMap = maps:from_list(Targets),
+    ioq:set_io_priority({db_compact, SourceName}),
     LogMsg1 = "~p initial_copy started ~s",
     LogArgs1 = [?MODULE, shardsstr(Source, Targets0)],
     couch_log:notice(LogMsg1, LogArgs1),