couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iil...@apache.org
Subject [1/2] couch-mrview commit: updated refs/heads/master to 56b66b4
Date Thu, 28 Apr 2016 00:38:08 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master 37351726a -> 56b66b483


Make view updater couch_work_queue configurable

For performance reasons in some cases there is a need to put a cap
on a queue size.

COUCHDB-3005


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/3f8230cb
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/3f8230cb
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/3f8230cb

Branch: refs/heads/master
Commit: 3f8230cbfc5b226080364cc9801cb0eeafc1985f
Parents: 3735172
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Tue Apr 26 13:55:11 2016 -0700
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Tue Apr 26 13:58:03 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/3f8230cb/src/couch_mrview_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_updater.erl b/src/couch_mrview_updater.erl
index da7381a..8a85887 100644
--- a/src/couch_mrview_updater.erl
+++ b/src/couch_mrview_updater.erl
@@ -21,7 +21,9 @@
 
 
 start_update(Partial, State, NumChanges) ->
-    QueueOpts = [{max_size, 100000}, {max_items, 500}],
+    MaxSize = config:get_integer("view_updater", "queue_memory_cap", 100000),
+    MaxItems = config:get_integer("view_updater", "queue_item_cap", 500),
+    QueueOpts = [{max_size, MaxSize}, {max_items, MaxItems}],
     {ok, DocQueue} = couch_work_queue:new(QueueOpts),
     {ok, WriteQueue} = couch_work_queue:new(QueueOpts),
 


Mime
View raw message