Bubble up missing_stub exceptions for proper retry A missing_stub exception is special in that the replicator retries the request without the atts_since optimmization.
COUCHDB-1901 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/15d75c36 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/15d75c36 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/15d75c36 Branch: refs/heads/1843-feature-bigcouch Commit: 15d75c360a5c27cc0a0d9f03a707ca5b08e31c88 Parents: 82dfb46 Author: Adam Kocoloski <[email protected]> Authored: Wed Oct 2 17:00:16 2013 -0400 Committer: Robert Newson <[email protected]> Committed: Thu Apr 24 17:36:48 2014 +0100 ---------------------------------------------------------------------- src/couch_replicator_api_wrap.erl | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/15d75c36/src/couch_replicator_api_wrap.erl ---------------------------------------------------------------------- diff --git a/src/couch_replicator_api_wrap.erl b/src/couch_replicator_api_wrap.erl index 2faeecd..590f6ef 100644 --- a/src/couch_replicator_api_wrap.erl +++ b/src/couch_replicator_api_wrap.erl @@ -215,6 +215,8 @@ open_doc_revs(#httpdb{} = HttpDb, Id, Revs, Options, Fun, Acc) -> receive {'DOWN', Ref, process, Pid, {exit_ok, Ret}} -> Ret; + {'DOWN', Ref, process, Pid, {{nocatch, {missing_stub,_} = Stub}, _}} -> + throw(Stub); {'DOWN', Ref, process, Pid, Else} -> Url = couch_util:url_strip_password( couch_replicator_httpc:full_url(HttpDb, [{path,Path}, {qs,QS}])
