Skip to content

Commit

Permalink
Merge pull request #474 from basho/jdb-aae-rehash-missing
Browse files Browse the repository at this point in the history
  • Loading branch information
jtuple committed Jan 30, 2013
2 parents d8475ea + 37fa0f8 commit a63b7d6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/riak_kv_vnode.erl
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,13 @@ handle_command({hashtree_pid, Node}, _, State=#state{hashtrees=HT}) ->
{reply, {error, wrong_node}, State}
end;
handle_command({rehash, Bucket, Key}, _, State=#state{mod=Mod, modstate=ModState}) ->
{ok, Bin, _UpdModState} = do_get_binary({Bucket, Key}, Mod, ModState),
update_hashtree(Bucket, Key, Bin, State),
case do_get_binary({Bucket, Key}, Mod, ModState) of
{ok, Bin, _UpdModState} ->
update_hashtree(Bucket, Key, Bin, State);
_ ->
%% Do nothing if data doesn't exist
ok
end,
{noreply, State};

%% Commands originating from inside this vnode
Expand Down

0 comments on commit a63b7d6

Please sign in to comment.