couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vatam...@apache.org
Subject [1/2] fabric commit: updated refs/heads/master to d22903c
Date Wed, 22 Feb 2017 02:23:32 GMT
Repository: couchdb-fabric
Updated Branches:
  refs/heads/master 70535eeb9 -> d22903c0c


Prevent attachment upload from timing out during update_docs fabric call

Currently if an attachment was large enough or the connection was slow enough
such that it took more than fabric.request_timeout = 60000 milliseconds, the
fabric request would time out during attachment data transfer from coordinator
node to other nodes and the whole request would fail.

This was most evident when replicating database with large attachments.

The fix is to periodically send `attachment_chunk_received` to coordinator to
prevent the timeout.

COUCHDB-3302


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

Branch: refs/heads/master
Commit: 6e9074bc8778e00471d96191319ac67d6c78c05a
Parents: 70535ee
Author: Nick Vatamaniuc <vatamane@apache.org>
Authored: Tue Feb 21 17:46:57 2017 -0500
Committer: Nick Vatamaniuc <vatamane@apache.org>
Committed: Tue Feb 21 17:46:57 2017 -0500

----------------------------------------------------------------------
 src/fabric_rpc.erl | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/6e9074bc/src/fabric_rpc.erl
----------------------------------------------------------------------
diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl
index 679a305..80b110a 100644
--- a/src/fabric_rpc.erl
+++ b/src/fabric_rpc.erl
@@ -422,6 +422,7 @@ make_att_reader({follows, Parser, Ref}) ->
         Parser ! {get_bytes, Ref, self()},
         receive
             {bytes, Ref, Bytes} ->
+                rexi:reply(attachment_chunk_received),
                 Bytes;
             {'DOWN', ParserRef, _, _, Reason} ->
                 throw({mp_parser_died, Reason})


Mime
View raw message