Permalink
Browse files

Use crypto:rand_uniform, not random:uniform

  • Loading branch information...
1 parent c5541f0 commit 3292b7d79287746b8b0feaf6ce7e4ffc0902f733 @krestenkrab committed Apr 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/riak_btree_backend.erl
@@ -437,7 +437,7 @@ schedule_compaction(Ref, Why) when is_reference(Ref) ->
init ->
%% start the first compaction in this partition at a random
%% time between now and the first cycle
- riak_kv_backend:callback_after(random:uniform(Interval), Ref, compaction_check)
+ riak_kv_backend:callback_after(crypto:rand_uniform(1, Interval), Ref, compaction_check)
end;
BadCompaction ->
error_logger:info_msg("Ignoring invalid riak_btree compaction interval: ~p\n",

0 comments on commit 3292b7d

Please sign in to comment.