Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exponential backoff and jitter for retries #204

Merged
merged 3 commits into from
Feb 10, 2024
Merged

Commits on Feb 8, 2024

  1. Add exponential backoff and jitter for retries

    Adds exponential backoff by multiplying the `retryTimeoutMs` by
    `2^attempt`. Adds a random jitter to spread out the retries. Although
    in the initial implementation the retry function isn't available to the
    user the code is written in a way that makes it easier to change that.
    
    Refactors the tests to avoid using `Thread#sleep`, which is not only a
    bad practice producing not deterministic tests but also makes them very
    slow. A reduction of more that 90% of testing time is percieved for the
    tests where this was changed.
    
    Resolves: loki4j#194
    acm19 committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    442ef05 View commit details
    Browse the repository at this point in the history
  2. Address code review comments

    acm19 committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    66b95f6 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2024

  1. Fix PR comments

    acm19 committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    027c6e1 View commit details
    Browse the repository at this point in the history