basho / riak_pipe

Riak Pipelines
Apache License 2.0
162 stars 60 forks source link

assume handoff if vnode exits 'normal' during queue requeuest #68

Closed russelldb closed 11 years ago

russelldb commented 11 years ago

RE-OPENING…https://github.com/basho/riak_pipe/pull/64 closed in error.

The pipe_verify_handoff_blocking test in riak_test PR 154 demonstrated that the monitor used by riak_pipe_vnode:queue_work_send may fire while handoff is taking place. This situation is further described in riak_pipe issue 63.

This commit addresses the problem by first checking whether the Reason for the vnode's exit was 'normal'. If it was not 'normal', the vnode_down error is returned as before. If it was 'normal', then it is assumed that handoff happened, and the monitor is moved to the new vnode, as indicated by riak_core_ring:next_owner/2.

russelldb commented 11 years ago

Ran https://github.com/basho/riak_test/pull/154 before and after and got fail and pass as you'd expect.

WFM +1.