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

Improvements to event dispatcher retry logic #5327

Merged
merged 6 commits into from
Oct 18, 2024

Conversation

obycode
Copy link
Contributor

@obycode obycode commented Oct 17, 2024

While debugging an issue with stacks-node -> API communication, I realized we could do some things better in this retry code. They are all pretty minor changes.

@obycode obycode requested a review from a team as a code owner October 17, 2024 21:00
- Create the request outside the loop
- Cap the backoff timeout at 3x timeout
- Print the retry attempt and backoff time in the log
- Add a jitter to the backoff time
jferrant
jferrant previously approved these changes Oct 17, 2024
This avoids a clone in the happy case (where no retry is needed).
@kantai kantai added this pull request to the merge queue Oct 18, 2024
Merged via the queue into develop with commit 3d1f829 Oct 18, 2024
140 checks passed
@obycode obycode deleted the chore/event-dispatcher-logs branch October 21, 2024 13:07
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants