Permalink
Browse files

pass errors up from new inputs+errors queue-list reply

  • Loading branch information...
1 parent fcfc9e7 commit 379f6b429f7af5d8dde6483af0ee4259415fd465 Bryan Fink committed May 16, 2012
Showing with 10 additions and 9 deletions.
  1. +5 −3 src/riak_kv_mrc_pipe.erl
  2. +5 −6 src/riak_kv_pipe_listkeys.erl
View
8 src/riak_kv_mrc_pipe.erl
@@ -604,11 +604,13 @@ send_key_list(Pipe, Bucket, ReqId) ->
queue_whole_list(Pipe, BKeys) ->
%% TODO: use core abilities to decide whether to use list inputs
case riak_pipe:queue_work_list(Pipe, BKeys) of
- [] ->
+ {[],[]} ->
ok;
- Rest ->
+ {Rest, []} ->
%% TODO: timeout, sleep?
- queue_whole_list(Pipe, Rest)
+ queue_whole_list(Pipe, Rest);
+ {_,Errors} ->
+ {error, Errors}
end.
%% @equiv collect_outputs(Pipe, NumKeeps, 60000)
View
11 src/riak_kv_pipe_listkeys.erl
@@ -92,7 +92,6 @@ keysend_loop(ReqId, Partition, FittingDetails) ->
riak_kv_vnode:ack_keys(From),
keysend_loop(ReqId, Partition, FittingDetails);
Error ->
- %% TODO: keysend/3 has no errors to bubble yet
Error
end;
{ReqId, {Bucket, Keys}} ->
@@ -101,7 +100,6 @@ keysend_loop(ReqId, Partition, FittingDetails) ->
ok ->
keysend_loop(ReqId, Partition, FittingDetails);
Error ->
- %% TODO: keysend/3 has no errors to bubble yet
Error
end;
{ReqId, done} ->
@@ -110,13 +108,14 @@ keysend_loop(ReqId, Partition, FittingDetails) ->
keysend(BKeys, Partition, FittingDetails) ->
%% TODO: use core abilities to decide whether to use list inputs
- %% TODO: handle errors in enqueueing
case riak_pipe_vnode_worker:send_output_list(
BKeys, Partition, FittingDetails) of
- [] ->
+ {[], []} ->
ok;
- Rest ->
- keysend(Rest, Partition, FittingDetails)
+ {Rest, []} ->
+ keysend(Rest, Partition, FittingDetails);
+ {_Rest, Errors} ->
+ {error, Errors}
end.
%% @doc Unused.

0 comments on commit 379f6b4

Please sign in to comment.