summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Avdey <eiri@eiri.ca>2019-08-28 21:32:02 -0300
committerGitHub <noreply@github.com>2019-08-28 21:32:02 -0300
commit063d939858d3d2146e2e9dd7049626dead27ec60 (patch)
tree010355c18bd3437ec717ec65d157bc4843c742a3
parent4f3e4d08dce7b9a64364724678fd4bb59f75ed82 (diff)
parentea5661dccebc1f04c8012fe8e3d15ae8f6a57c4b (diff)
downloadcouchdb-063d939858d3d2146e2e9dd7049626dead27ec60.tar.gz
Merge pull request #2153 from apache/fix-all-docs-timeout
Fix badmatch in fabric_view_all_docs
-rw-r--r--src/fabric/src/fabric_view_all_docs.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fabric/src/fabric_view_all_docs.erl b/src/fabric/src/fabric_view_all_docs.erl
index 1d87e3ddd..5fe143731 100644
--- a/src/fabric/src/fabric_view_all_docs.erl
+++ b/src/fabric/src/fabric_view_all_docs.erl
@@ -104,10 +104,15 @@ go(DbName, Options, QueryArgs, Callback, Acc0) ->
[{total, TotalRows}, {offset, null}, {update_seq, null}]
end,
{ok, Acc1} = Callback({meta, Meta}, Acc0),
- {ok, Acc2} = doc_receive_loop(
+ Resp = doc_receive_loop(
Keys3, queue:new(), SpawnFun, MaxJobs, Callback, Acc1
),
- Callback(complete, Acc2);
+ case Resp of
+ {ok, Acc2} ->
+ Callback(complete, Acc2);
+ timeout ->
+ Callback(timeout, Acc0)
+ end;
{'DOWN', Ref, _, _, Error} ->
Callback({error, Error}, Acc0)
after Timeout ->