Skip to content

Commit

Permalink
force gc in vnode and vnode_master
Browse files Browse the repository at this point in the history
  • Loading branch information
argv0 committed Aug 16, 2011
1 parent e2e4473 commit 8d39eba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/riak_core_vnode.erl
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ get_mod_index(VNode) ->
gen_fsm:sync_send_all_state_event(VNode, get_mod_index).

continue(State) ->
erlang:garbage_collect(),
{next_state, active, State, State#state.inactivity_timeout}.

continue(State, NewModState) ->
erlang:garbage_collect(),
continue(State#state{modstate=NewModState}).


Expand Down
1 change: 1 addition & 0 deletions src/riak_core_vnode_master.erl
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ add_vnode_rec(I, _State=#state{idxtab=T}) -> ets:insert(T,I).

%% @private
get_vnode(Idx, State=#state{vnode_mod=Mod}) ->
erlang:garbage_collect(),
case idx2vnode(Idx, State) of
no_match ->
{ok, Pid} = riak_core_vnode_sup:start_vnode(Mod, Idx),
Expand Down

0 comments on commit 8d39eba

Please sign in to comment.