You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2015/07/20 23:17:17 UTC
chttpd commit: updated refs/heads/2724-chunked-buffering to 57a8dff
Repository: couchdb-chttpd
Updated Branches:
refs/heads/2724-chunked-buffering 0ffc16d0d -> 57a8dff89
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/57a8dff8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/57a8dff8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/57a8dff8
Branch: refs/heads/2724-chunked-buffering
Commit: 57a8dff89794eb4b748070ab9104ab5bcd07db6c
Parents: 0ffc16d
Author: Adam Kocoloski <ad...@cloudant.com>
Authored: Mon Jul 20 17:16:10 2015 -0400
Committer: Adam Kocoloski <ad...@cloudant.com>
Committed: Mon Jul 20 17:16:10 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/57a8dff8/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/57a8dff8/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