Skip to content
Browse files

Bug 520 - vnode throws error during handoff

Remove code that performs a double-wrapping of requests.
  • Loading branch information...
1 parent ece9c3a commit 3bdc33b07aee3ba291a58da8f8d5ba8a5cab91bd @slfritchie slfritchie committed Feb 10, 2011
Showing with 7 additions and 8 deletions.
  1. +7 −8 src/riak_core_vnode.erl
View
15 src/riak_core_vnode.erl
@@ -106,19 +106,18 @@ vnode_command(Sender, Request, State=#state{mod=Mod, modstate=ModState}) ->
{stop, Reason, State#state{modstate=NewModState}}
end.
-vnode_handoff_command(Sender, Request, WrapperReq,
- State=#state{index=Index,
- mod=Mod,
- modstate=ModState,
- handoff_node=HN}) ->
+vnode_handoff_command(Sender, Request, State=#state{index=Index,
+ mod=Mod,
+ modstate=ModState,
+ handoff_node=HN}) ->
case Mod:handle_handoff_command(Request, Sender, ModState) of
{reply, Reply, NewModState} ->
reply(Sender, Reply),
continue(State, NewModState);
{noreply, NewModState} ->
continue(State, NewModState);
{forward, NewModState} ->
- riak_core_vnode_master:command({Index, HN}, WrapperReq, Sender,
+ riak_core_vnode_master:command({Index, HN}, Request, Sender,
riak_core_vnode_master:reg_name(Mod)),
continue(State, NewModState);
{drop, NewModState} ->
@@ -142,8 +141,8 @@ active(timeout, State=#state{mod=Mod, modstate=ModState}) ->
active(?VNODE_REQ{sender=Sender, request=Request},
State=#state{handoff_node=HN}) when HN =:= none ->
vnode_command(Sender, Request, State);
-active(VR=?VNODE_REQ{sender=Sender, request=Request},State) ->
- vnode_handoff_command(Sender, Request, VR, State);
+active(?VNODE_REQ{sender=Sender, request=Request},State) ->
+ vnode_handoff_command(Sender, Request, State);
active(handoff_complete, State=#state{mod=Mod,
modstate=ModState,
index=Idx,

0 comments on commit 3bdc33b

Please sign in to comment.
Something went wrong with that request. Please try again.