You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ii...@apache.org on 2016/04/25 18:26:17 UTC

[1/2] couch-mrview commit: updated refs/heads/master to 3735172

Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master 65b7a3a64 -> 37351726a


Use ioq to separately prioritise view updates

COUCHDB-3002


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

Branch: refs/heads/master
Commit: abc94a40da81211395501d91cd5d1fb73e6afbe9
Parents: 65b7a3a
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Thu Apr 21 12:45:34 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Thu Apr 21 12:45:34 2016 -0700

----------------------------------------------------------------------
 src/couch_mrview_updater.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/abc94a40/src/couch_mrview_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_updater.erl b/src/couch_mrview_updater.erl
index 0745c2a..da7381a 100644
--- a/src/couch_mrview_updater.erl
+++ b/src/couch_mrview_updater.erl
@@ -168,7 +168,8 @@ finish_update(#mrst{doc_acc=Acc}=State) ->
     end.
 
 
-map_docs(Parent, State0) ->
+map_docs(Parent, #mrst{db_name = DbName, idx_name = IdxName} = State0) ->
+    erlang:put(io_priority, {view_update, DbName, IdxName}),
     case couch_work_queue:dequeue(State0#mrst.doc_queue) of
         closed ->
             couch_query_servers:stop_doc_map(State0#mrst.qserver),
@@ -201,11 +202,12 @@ map_docs(Parent, State0) ->
     end.
 
 
-write_results(Parent, State) ->
+write_results(Parent, #mrst{db_name = DbName, idx_name = IdxName} = State) ->
     case accumulate_writes(State, State#mrst.write_queue, nil) of
         stop ->
             Parent ! {new_state, State};
         {Go, {Seq, ViewKVs, DocIdKeys, Seqs, Log}} ->
+            erlang:put(io_priority, {view_update, DbName, IdxName}),
             NewState = write_kvs(State, Seq, ViewKVs, DocIdKeys, Seqs, Log),
             if Go == stop ->
                 Parent ! {new_state, NewState};


[2/2] couch-mrview commit: updated refs/heads/master to 3735172

Posted by ii...@apache.org.
Merge remote branch 'cloudant:3002-use-ioq-for-view_updades'

This closes #43

Signed-off-by: ILYA Khlopotov <ii...@ca.ibm.com>


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

Branch: refs/heads/master
Commit: 37351726a03aaa224ba08f475bfb7c403f94d5ee
Parents: 65b7a3a abc94a4
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Mon Apr 25 09:25:56 2016 -0700
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Mon Apr 25 09:25:56 2016 -0700

----------------------------------------------------------------------
 src/couch_mrview_updater.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------