Skip to content

Commit

Permalink
Merge pull request #236 from basho/jrm-always-use-legacy-stats
Browse files Browse the repository at this point in the history
Always use legacy stats until new stats are fixed.
  • Loading branch information
massung committed Oct 11, 2011
2 parents 6cb56ff + 50a8af7 commit f7303ce
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/riak_kv_stat.erl
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,14 @@ init([]) ->
process_flag(trap_exit, true),
remove_slide_private_dirs(),
case application:get_env(riak_kv, legacy_stats) of
{ok, true} ->
legacy_init();
{ok, false} ->
lager:warning("Overriding user-setting and using legacy stats. Set {legacy_stats,true} to remove this message.");
_ ->
v2_init()
end.
ok
end,
legacy_init().

-ifdef(not_defined).
make_meter() ->
{ok, M} = basho_metrics_nifs:meter_new(),
{meter, M}.
Expand Down Expand Up @@ -263,6 +265,7 @@ v2_init() ->
get_meter=make_meter(),
put_meter=make_meter(),
legacy=false}}.
-endif.

legacy_init() ->
{ok, #state{vnode_gets=spiraltime:fresh(),
Expand Down

0 comments on commit f7303ce

Please sign in to comment.