Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Commit

Permalink
Prevent attachment upload from timing out during update_docs fabric call
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nickva committed Feb 21, 2017
1 parent 70535ee commit 6e9074b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/fabric_rpc.erl
Expand Up @@ -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})
Expand Down

0 comments on commit 6e9074b

Please sign in to comment.