You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/03/09 18:30:34 UTC
[GitHub] davisp commented on issue #1142: fabric:query_view/4 fails if number of docs in the DB is more than 60
davisp commented on issue #1142: fabric:query_view/4 fails if number of docs in the DB is more than 60
URL: https://github.com/apache/couchdb/issues/1142#issuecomment-371904385
First guess is that you're mixing up the rexi message handling. The rexi_util:recv function isn't written to handle multiple nested calls and will end up chewing through and mixing up messages from RPC workers. A quick test is to use something of this nature to replace you fabric:query_view call:
```erlang
do_query(DbName, VName, QArgs) ->
{_, Ref} = spawn_monitor(fun() ->
try
Resp = fabric:query_view(<<"db1">>, DName, VName, QArgs)
exit({xkcd_ok, Resp})
catch T:R ->
S = erlang:get_stacktrace(),
exit({xkcd_error, T, R, S})
end),
receive
{'DOWN', Ref, _, _, {xkcd_ok, Resp}} ->
Resp
{'DOWN', Ref, _, _, {xkcd_error, T, R, S}} ->
erlang:raise(T, R, S)
end.
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services