couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject [7/7] chttpd commit: updated refs/heads/2724-chunked-buffering to 45bb534
Date Wed, 22 Jul 2015 21:01:28 GMT
Allow configurable buffer size for all_docs, views

Now that couch_mrview can buffer chunked responses we should pass the
config value for the buffer size to it.


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

Branch: refs/heads/2724-chunked-buffering
Commit: c0b88502a3d80bf0ccedcb6a57abdfd37786eab0
Parents: cf720aa
Author: Adam Kocoloski <adam@cloudant.com>
Authored: Mon Jul 20 17:16:10 2015 -0400
Committer: Adam Kocoloski <adam@cloudant.com>
Committed: Wed Jul 22 16:57:49 2015 -0400

----------------------------------------------------------------------
 src/chttpd_db.erl   | 3 ++-
 src/chttpd_view.erl | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/c0b88502/src/chttpd_db.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index d8327b1..ea3879f 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -604,7 +604,8 @@ all_docs_view(Req, Db, Keys, OP) ->
     Args = Args3#mrargs{preflight_fun=ETagFun},
     Options = [{user_ctx, Req#httpd.user_ctx}],
     {ok, Resp} = couch_httpd:etag_maybe(Req, fun() ->
-        VAcc0 = #vacc{db=Db, req=Req},
+        Max = config:get_integer("httpd", "chunked_response_buffer", 1490),
+        VAcc0 = #vacc{db=Db, req=Req, threshold=Max},
         fabric:all_docs(Db, Options, fun couch_mrview_http:view_cb/2, VAcc0, Args)
     end),
     case is_record(Resp, vacc) of

http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/c0b88502/src/chttpd_view.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_view.erl b/src/chttpd_view.erl
index fb421a4..009aa8f 100644
--- a/src/chttpd_view.erl
+++ b/src/chttpd_view.erl
@@ -53,7 +53,8 @@ design_doc_view(Req, Db, DDoc, ViewName, Keys) ->
     end,
     Args = Args0#mrargs{preflight_fun=ETagFun},
     {ok, Resp} = couch_httpd:etag_maybe(Req, fun() ->
-        VAcc0 = #vacc{db=Db, req=Req},
+        Max = config:get_integer("httpd", "chunked_response_buffer", 1490),
+        VAcc0 = #vacc{db=Db, req=Req, threshold=Max},
         fabric:query_view(Db, DDoc, ViewName, fun couch_mrview_http:view_cb/2, VAcc0, Args)
     end),
     case is_record(Resp, vacc) of


Mime
View raw message