Skip to content

Commit

Permalink
fix: Update random to 0-10000 instead of 0-100 (#198)
Browse files Browse the repository at this point in the history
After thorough testing with Go, Java and Javascript the last few days,
we've found that using 0-100 didn't give enough entropy to the first
bytes of the hash bucket, causing odd distributions. This updates to
using 10000 as the max range to increase entropy and reflect what we do
in node (since January) and in go (since April).
  • Loading branch information
Christopher Kolstad authored Apr 11, 2023
1 parent 2e088ca commit 919abff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class FlexibleRolloutStrategy implements Strategy {
private Supplier<String> randomGenerator;

public FlexibleRolloutStrategy() {
this.randomGenerator = () -> Math.random() * 100 + "";
this.randomGenerator = () -> Math.random() * 10000 + "";
}

public FlexibleRolloutStrategy(Supplier<String> randomGenerator) {
Expand Down

0 comments on commit 919abff

Please sign in to comment.