Description
Hey all,
Great work on this project. Reaching out because I feel like the documentation is a bit unclear as to what happens in the following case:
@Backoff(delay = 2000, multiplier = 1.0, random = true))
You'd think you're introducing randomness here by setting random to true, but this is not the case. Refer to this line https://github.com/spring-projects/spring-retry/blob/v2.0.4/src/main/java/org/springframework/retry/backoff/ExponentialRandomBackOffPolicy.java#L79
next = (long) (next * (1 + r.nextFloat() * (getMultiplier() - 1)));
When multiplier is 1.0 that line of code basically boils down to next = next. This doesn't create randomness and allows a thundering herd problem to persist. At the very least, can the documentation be more clear that random should be used with multiplier values greater than 1.0. Even better, can multiplier = 1.0 and random = true just be flagged and raised as an invalid configuration?
Thanks!
John