Skip to content

Releases: juju/retry

v1.0.1

17 Sep 17:51
d9c58a0
Compare
Choose a tag to compare

What's Changed

This is a small bugfix update from previous versions, though there is one small behavioral change.

The primary fix is that previously if you did ExpBackoff(min=1.0, max=200, factor=2.0, jitter=false), then the times would be in the expected 1.0, 2.0, 4.0. Up to the max. However, when you set jitter=true, while it would preserve the maximum to be the same time as the original backoff, it would pick a random value from 0ms to the max delay, and then truncate that to the minDelay. Which meant that it actually changed the average wait time to something close to 50% of the expected times.

The new logic does a +/- 20% from the expected delay, and then caps that at min and max. This averages very close to the expected values (in testing, the over time difference is around a 1% shift.)

Full Changelog: https://github.com/juju/retry/compare/v1.0.0...v1.0.1## What's Changed

  • fix: cleanup our handling of jitter and other misc by @jameinel in #12

v1.0.0

12 Jul 10:17
62423bf
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/juju/retry/commits/v1.0.0