summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_view_updater.erl
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-08-21 20:23:06 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-08-21 20:23:06 +0000
commit043671429beae470fa9560bfaab0a45324c8f956 (patch)
tree89d26a801b549056bb34343a398d99d0799fdeef /src/couchdb/couch_view_updater.erl
parent9b3c2688feba69fe178b4d1e9ecff5c1a36c9475 (diff)
Small refactoring of the work queue module to accomodate for incoming options (multiple workers)
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@987824 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_view_updater.erl')
-rw-r--r--src/couchdb/couch_view_updater.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/couchdb/couch_view_updater.erl b/src/couchdb/couch_view_updater.erl
index 2a9c960f..70a60950 100644
--- a/src/couchdb/couch_view_updater.erl
+++ b/src/couchdb/couch_view_updater.erl
@@ -38,8 +38,10 @@ update(Owner, Group) ->
couch_task_status:update(<<"Resetting view index due to lost purge entries.">>),
exit(reset)
end,
- {ok, MapQueue} = couch_work_queue:new(100000, 500),
- {ok, WriteQueue} = couch_work_queue:new(100000, 500),
+ {ok, MapQueue} = couch_work_queue:new(
+ [{max_size, 100000}, {max_items, 500}]),
+ {ok, WriteQueue} = couch_work_queue:new(
+ [{max_size, 100000}, {max_items, 500}]),
Self = self(),
ViewEmptyKVs = [{View, []} || View <- Group2#group.views],
spawn_link(fun() -> do_maps(Group, MapQueue, WriteQueue, ViewEmptyKVs) end),