Skip to content
Browse files

remove the unused 'mget' command from riak_kv_vnode

As of basho/riak_kv#433 (removal of luke), nothing uses this command.
  • Loading branch information...
1 parent b0255c0 commit b69961dd0749489a5ca722c53aed86efda9702fe Bryan Fink committed
Showing with 0 additions and 30 deletions.
  1. +0 −6 include/riak_kv_vnode.hrl
  2. +0 −24 src/riak_kv_vnode.erl
View
6 include/riak_kv_vnode.hrl
@@ -11,11 +11,6 @@
bkey :: {binary(), binary()},
req_id :: non_neg_integer()}).
--record(riak_kv_mget_req_v1, {
- bkeys :: list({binary(), binary()}),
- req_id :: non_neg_integer(),
- from :: term()}).
-
-record(riak_kv_listkeys_req_v1, {
bucket :: binary(),
req_id :: non_neg_integer()}).
@@ -66,7 +61,6 @@
-define(KV_PUT_REQ, #riak_kv_put_req_v1).
-define(KV_GET_REQ, #riak_kv_get_req_v1).
--define(KV_MGET_REQ, #riak_kv_mget_req_v1).
-define(KV_LISTBUCKETS_REQ, #riak_kv_listbuckets_req_v1).
-define(KV_LISTKEYS_REQ, #riak_kv_listkeys_req_v4).
-define(KV_INDEX_REQ, #riak_kv_index_req_v2).
View
24 src/riak_kv_vnode.erl
@@ -29,7 +29,6 @@
-export([test_vnode/1, put/7]).
-export([start_vnode/1,
get/3,
- mget/3,
del/3,
put/6,
coord_put/6,
@@ -118,14 +117,6 @@ get(Preflist, BKey, ReqId) ->
{fsm, undefined, self()},
riak_kv_vnode_master).
-mget(Preflist, BKeys, ReqId) ->
- Req = ?KV_MGET_REQ{bkeys=BKeys,
- req_id=ReqId,
- from={fsm, self()}},
- riak_core_vnode_master:command(Preflist,
- Req,
- riak_kv_vnode_master).
-
del(Preflist, BKey, ReqId) ->
riak_core_vnode_master:command(Preflist,
?KV_DELETE_REQ{bkey=BKey,
@@ -287,8 +278,6 @@ handle_command(?KV_PUT_REQ{bkey=BKey,
handle_command(?KV_GET_REQ{bkey=BKey,req_id=ReqId},Sender,State) ->
do_get(Sender, BKey, ReqId, State);
-handle_command(?KV_MGET_REQ{bkeys=BKeys, req_id=ReqId, from=From}, _Sender, State) ->
- do_mget(From, BKeys, ReqId, State);
handle_command(#riak_kv_listkeys_req_v1{bucket=Bucket, req_id=ReqId}, _Sender,
State=#state{mod=Mod, modstate=ModState, idx=Idx}) ->
do_legacy_list_bucket(ReqId,Bucket,Mod,ModState,Idx,State);
@@ -828,19 +817,6 @@ do_get(_Sender, BKey, ReqID,
riak_kv_stat:update(vnode_get),
{reply, {r, Retval, Idx, ReqID}, State}.
-do_mget({fsm, Sender}, BKeys, ReqId, State=#state{idx=Idx, mod=Mod, modstate=ModState}) ->
- F = fun(BKey) ->
- R = do_get_term(BKey, Mod, ModState),
- case R of
- {ok, Obj} ->
- gen_fsm:send_event(Sender, {r, Obj, Idx, ReqId});
- _ ->
- gen_fsm:send_event(Sender, {r, {R, BKey}, Idx, ReqId})
- end,
- riak_kv_stat:update(vnode_get) end,
- [F(BKey) || BKey <- BKeys],
- {noreply, State}.
-
%% @private
do_get_term(BKey, Mod, ModState) ->
case do_get_binary(BKey, Mod, ModState) of

0 comments on commit b69961d

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