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 retryJitter option to add jitter to retryTimeout #22

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

shezadkhan137
Copy link
Contributor

Adds an option to randomly spread the retryTimeout over a window between
retryTimeout ± retryJitter.

Adds an option to randomly spread the retryTimeout over a window between
retryTimeout ± retryJitter.
Copy link
Contributor

@Xopherus Xopherus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think we should also consider removing retryTimeout from the NewServer constructor in a future PR (I know that's outside of the scope of this PR).

There's a few minor style concerns I have (mostly re: the wsl linter) but I see that we're pretty out of date in our golangci-lint version, so I will handle upgrading that!

@@ -260,3 +281,21 @@ func WithRetries(delay time.Duration, max int) Option {
return nil
}
}

// WithRetryJitter sets a value for Jitter on the VisibilityTimeout.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Xopherus Xopherus merged commit 78c2565 into zerofox-oss:master Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants