couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [36/50] fabric commit: updated refs/heads/windsor-merge-121 to 79e6e2f
Date Fri, 01 Aug 2014 09:12:24 GMT
Set io_priority properly for all requests

Notably, changes wasn't calling set_io_priority so was not affected by
maintenance_mode.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/a8b9e3fa
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/a8b9e3fa
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/a8b9e3fa

Branch: refs/heads/windsor-merge-121
Commit: a8b9e3faa1af2ca1ec0495553b105868d9e92262
Parents: 5fd7f6b
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Fri Oct 4 16:35:13 2013 -0500
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Jul 31 16:12:59 2014 +0100

----------------------------------------------------------------------
 src/fabric_rpc.erl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/a8b9e3fa/src/fabric_rpc.erl
----------------------------------------------------------------------
diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl
index 7f9b88b..d61da40 100644
--- a/src/fabric_rpc.erl
+++ b/src/fabric_rpc.erl
@@ -37,7 +37,7 @@ changes(DbName, Args, StartSeq) ->
 changes(DbName, #changes_args{} = Args, StartSeq, DbOptions) ->
     changes(DbName, [Args], StartSeq, DbOptions);
 changes(DbName, Options, StartVector, DbOptions) ->
-    erlang:put(io_priority, {interactive, DbName}),
+    set_io_priority(DbName, DbOptions),
     #changes_args{dir=Dir} = Args = lists:keyfind(changes_args, 1, Options),
     case get_or_create_db(DbName, DbOptions) of
     {ok, Db} ->
@@ -57,6 +57,7 @@ changes(DbName, Options, StartVector, DbOptions) ->
     end.
 
 all_docs(DbName, Options, #mrargs{keys=undefined} = Args0) ->
+    set_io_priority(DbName, Options),
     Args = fix_skip_and_limit(Args0),
     {ok, Db} = get_or_create_db(DbName, Options),
     VAcc0 = #vacc{db=Db},
@@ -67,6 +68,7 @@ map_view(DbName, DDoc, ViewName, Args0) ->
     map_view(DbName, DDoc, ViewName, Args0, []).
 
 map_view(DbName, DDoc, ViewName, Args0, DbOptions) ->
+    set_io_priority(DbName, DbOptions),
     Args = fix_skip_and_limit(Args0),
     {ok, Db} = get_or_create_db(DbName, DbOptions),
     VAcc0 = #vacc{db=Db},
@@ -77,6 +79,7 @@ reduce_view(DbName, DDoc, ViewName, Args0) ->
     reduce_view(DbName, DDoc, ViewName, Args0, []).
 
 reduce_view(DbName, DDoc, ViewName, Args0, DbOptions) ->
+    set_io_priority(DbName, DbOptions),
     Args = fix_skip_and_limit(Args0),
     {ok, Db} = get_or_create_db(DbName, DbOptions),
     VAcc0 = #vacc{db=Db},


Mime
View raw message