You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/01/17 23:07:17 UTC

[43/50] git commit: Enable clustered multipart-mime uploads

Enable clustered multipart-mime uploads

We have to insert a middleman process into the parsing so that each of
our copies can retrieve the data as its uploaded.


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

Branch: refs/heads/import
Commit: 18d2da5948ace3191eb8af056962de8e2ebbaff1
Parents: b6f3c98
Author: Paul J. Davis <pa...@gmail.com>
Authored: Fri Mar 8 12:43:25 2013 -0600
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Mar 20 06:02:44 2013 -0500

----------------------------------------------------------------------
 src/couch_replicator_api_wrap.erl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/18d2da59/src/couch_replicator_api_wrap.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_api_wrap.erl b/src/couch_replicator_api_wrap.erl
index 01b9b68..d072187 100644
--- a/src/couch_replicator_api_wrap.erl
+++ b/src/couch_replicator_api_wrap.erl
@@ -530,17 +530,18 @@ receive_docs(Streamer, UserFun, Ref, UserAcc) ->
     {headers, Ref, Headers} ->
         case get_value("content-type", Headers) of
         {"multipart/related", _} = ContentType ->
-            case doc_from_multi_part_stream(
+            case couch_doc:doc_from_multi_part_stream(
                 ContentType,
                 fun() -> receive_doc_data(Streamer, Ref) end,
                 Ref) of
-            {ok, Doc, Parser} ->
+            {ok, Doc, WaitFun, Parser} ->
                 case UserFun({ok, Doc}, UserAcc) of
                 {ok, UserAcc2} ->
                     ok;
                 {skip, UserAcc2} ->
                     couch_doc:abort_multi_part_stream(Parser)
                 end,
+                WaitFun(),
                 receive_docs(Streamer, UserFun, Ref, UserAcc2)
             end;
         {"application/json", []} ->