Source

riak / src / riak_delete.erl

Diff from to

File src/riak_delete.erl

     RealStartTime = riak_util:moment(),
     ReqID = erlang:phash2({random:uniform(),self(),Bucket,Key,RealStartTime}),
     riak_eventer:notify(riak_delete, delete_start, {ReqID, Bucket, Key}),
-    case gen_server:call({riak_api, node()},
-                              {get,Bucket,Key,RW,Timeout}) of
+    case gen_server2:call({riak_api, node()},
+                          {get,Bucket,Key,RW,Timeout}) of
         {ok, OrigObj} ->
             RemainingTime = Timeout - (riak_util:moment() - RealStartTime),
             OrigMD = hd([MD || {MD,_V} <- riak_object:get_contents(OrigObj)]),
                 _ -> nop
             end,
             riak_eventer:notify(riak_delete, delete_reply, {ReqID, Reply}),
-            gen_server:reply(Client, Reply);
+            gen_server2:reply(Client, Reply);
         {error, notfound} ->
             spawn(fun()-> riak_bucketkeys:del_key(Bucket,Key) end),
             riak_eventer:notify(riak_delete, delete_reply,
                                 {ReqID, {error, notfound}}),
-            gen_server:reply(Client, {error, notfound});
+            gen_server2:reply(Client, {error, notfound});
         X ->
             riak_eventer:notify(riak_delete, delete_reply, {ReqID, X}),
-            gen_server:reply(Client, X)
+            gen_server2:reply(Client, X)
     end.
 
 reap(Bucket, Key, WaitTime, Timeout, ReqId) ->
     timer:sleep(WaitTime),
-    case gen_server:call({riak_api, node()}, 
-                         {get, Bucket, Key, 1, Timeout}) of
+    case gen_server2:call({riak_api, node()}, 
+                          {get, Bucket, Key, 1, Timeout}) of
         {error, notfound} ->
             riak_eventer:notify(riak_delete, finalize_reap, 
                                 {ReqId, Bucket, Key, ok});