Commits

Anonymous committed fe9720b

change successful put fsm event names so riak_repl can match them efficiently

  • Participants
  • Parent commits 0d63274

Comments (0)

Files changed (1)

src/riak_put_fsm.erl

     {next_state,waiting_vnode_w,StateData,Timeout}.
 
 waiting_vnode_w({w, Idx, ReqId},
-                  StateData=#state{w=W,dw=DW,req_id=ReqId,client=Client,
+                  StateData=#state{w=W,dw=DW,req_id=ReqId,client=Client, bkey={Bucket, Key},
                                    replied_w=Replied0, endtime=End}) ->
     Replied = [Idx|Replied0],
     case length(Replied) >= W of
             case DW of
                 0 ->
                     Client ! {ReqId, ok},
-                    riak_eventer:notify(riak_put_fsm, put_fsm_reply,
-                                        {ReqId, ok}),
+                    riak_eventer:notify(riak_put_fsm, put_fsm_reply_ok,
+                                        {ReqId, ok, {Bucket, Key}}),
                     {stop,normal,StateData};
                 _ ->
                     NewStateData = StateData#state{replied_w=Replied},
           StateData=#state{req_id=ReqId, endtime=End}) ->
     {next_state,waiting_vnode_dw,StateData,End-riak_util:moment()};
 waiting_vnode_dw({dw, Idx, ReqId},
-                  StateData=#state{dw=DW, client=Client,
+                 StateData=#state{dw=DW, client=Client, bkey={Bucket, Key},
                                    replied_dw=Replied0, endtime=End}) ->
     Replied = [Idx|Replied0],
     case length(Replied) >= DW of
         true ->
-            riak_eventer:notify(riak_put_fsm, put_fsm_reply,
-                                {ReqId, ok}),
+            riak_eventer:notify(riak_put_fsm, put_fsm_reply_ok,
+                                {ReqId, ok, {Bucket, Key}}),
             Client ! {ReqId, ok},
             {stop,normal,StateData};
         false ->