Source

riak / src / riak_mapreduce_fsm.erl

Diff from to

src/riak_mapreduce_fsm.erl

         {bad_qterm, QTerm} ->
             riak_eventer:notify(riak_mapreduce_fsm, mr_fsm_done,
                                 {error, {bad_qterm, QTerm}}),
-            gen_server:reply(Client,{error, {bad_qterm, QTerm}}),
+            gen_server2:reply(Client,{error, {bad_qterm, QTerm}}),
             {stop,normal}
     end.
 
         [] -> 
             riak_eventer:notify(riak_mapreduce_fsm, mr_fsm_done,
                                 {ok, ReqID, length(Acc)}),
-            gen_server:reply(Client,{ok, Acc}),
+            gen_server2:reply(Client,{ok, Acc}),
             {stop,normal,StateData};
         _ ->
             {next_state, wait, StateData#state{fsms=FSMs},
     FSMs = lists:delete(ErrFSM,FSMs0),
     [gen_fsm:send_event(FSM, die) || FSM <- FSMs],
     riak_eventer:notify(riak_mapreduce_fsm, mr_fsm_done, {error, ReqID}),
-    gen_server:reply(Client,{error, ErrMsg}),
+    gen_server2:reply(Client,{error, ErrMsg}),
     {stop,normal,StateData};
 wait({acc,Data}, StateData=#state{acc=Acc,endtime=End}) ->
     AccData = case Data of
     {next_state, wait, StateData#state{acc=AccData},End-riak_util:moment()};
 wait(timeout, StateData=#state{reqid=ReqID,client=Client}) ->
     riak_eventer:notify(riak_mapreduce_fsm, mr_fsm_done, {timeout, ReqID}),
-    gen_server:reply(Client,{error, timeout}),
+    gen_server2:reply(Client,{error, timeout}),
     {stop,normal,StateData}.
 
 %% @private