summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2013-10-02 17:00:16 -0400
committerAdam Kocoloski <adam@cloudant.com>2013-10-02 17:00:16 -0400
commitdf0423b5d5c35170626cfc0c10216d2e72e3a83e (patch)
treee607f3190d87501755b6ef44fb73b7d871c09f56
parenta72d1f9c895ddfed00f27820a9b46e17d50515c9 (diff)
downloadcouchdb-1901-atomic-multipart-retries.tar.gz
Bubble up missing_stub exceptions for proper retry1901-atomic-multipart-retries
A missing_stub exception is special in that the replicator retries the request without the atts_since optimmization. COUCHDB-1901
-rw-r--r--src/couch_replicator/src/couch_replicator_api_wrap.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/couch_replicator/src/couch_replicator_api_wrap.erl b/src/couch_replicator/src/couch_replicator_api_wrap.erl
index eb7d84504..52e15b7fa 100644
--- a/src/couch_replicator/src/couch_replicator_api_wrap.erl
+++ b/src/couch_replicator/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}])