basho / riak_pipe

Riak Pipelines
Apache License 2.0
162 stars 60 forks source link

rpc:call try/catch rex #86

Closed joedevivo closed 10 years ago

joedevivo commented 10 years ago
/Users/joe/dev/basho/riak_ee/deps/riak_pipe/src/riak_pipe.erl:
  429        || Node <- riak_core_node_watcher:nodes(riak_pipe) ];
  430  active_pipelines(Node) when is_atom(Node) ->
  431:     case rpc:call(Node, riak_pipe_builder_sup, pipelines, []) of
  432          {badrpc, _}=Reason ->
  433              {error, Reason};
  ...
  531              %% lookup vnode pid
  532              Node = riak_core_ring:index_owner(Ring, Partition),
  533:             {ok, Vnode} = rpc:call(Node,
  534                                     riak_core_vnode_master, get_vnode_pid,
  535                                     [Partition, riak_pipe_vnode]),

/Users/joe/dev/basho/riak_ee/deps/riak_pipe/src/riak_pipe_vnode.erl:
  370              %% monitor new vnode, since the input will be handled
  371              %% there, instead of at the vnode originally contacted
  372:             {ok, NextPid} = rpc:call(Next,
  373                                       riak_core_vnode_master,
  374                                       get_vnode_pid,
joedevivo commented 10 years ago

Tracing call path of rpc at riak_pipe:533.

riak_pipe:status/1:454

As I understand this, riak_pipe:status/1 is something you attach to a console to run. The return type should be informative, so we're going to hande both {badrpc, _} and exit:_. by returning an error tuple for the user to see.

joedevivo commented 10 years ago
Test Results:
pipe_verify_sink_types-bitcask              : pass
pipe_verify_restart_input_forwarding-bitcask: pass
pipe_verify_handoff_blocking-bitcask        : pass
pipe_verify_handoff-bitcask                 : pass
pipe_verify_exceptions-bitcask              : pass
pipe_verify_examples-bitcask                : pass
pipe_verify_basics-bitcask                  : pass
mapred_javascript-bitcask                   : pass
mapred_http_errors-bitcask                  : pass
mapred_dead_pipe-bitcask                    : pass
mapred_buffer_prereduce-bitcask             : pass
mapred_basic_compat-bitcask                 : pass
---------------------------------------------
0 Tests Failed
12 Tests Passed
That's 100.0% for those keeping score
cmeiklejohn commented 10 years ago

:+1: 9e84475

cmeiklejohn commented 10 years ago

@borshop hello?

cmeiklejohn commented 10 years ago

@borshop retry

cmeiklejohn commented 10 years ago

YOLO handmerge