Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use crypto:rand_uniform, not random:uniform

  • Loading branch information...
commit 3292b7d79287746b8b0feaf6ce7e4ffc0902f733 1 parent c5541f0
Kresten Krab Thorup authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/riak_btree_backend.erl
2  src/riak_btree_backend.erl
View
@@ -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",
Please sign in to comment.
Something went wrong with that request. Please try again.