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

catchup: use specialized backoff behavior for follower mode #5836

Merged
merged 1 commit into from Nov 16, 2023

Conversation

cce
Copy link
Contributor

@cce cce commented Nov 16, 2023

Summary

This introduces polling delay between 404 responses for blocks when running in follow mode, which uses catchup to continuously poll for new blocks, rather than using agreement. In follow mode, aborting the catchup process causes unnecessary latency in observing the latest blocks.

On the contrary, in regular catchup, it is desirable to abort catchup right away when you reach the latest round, so that agreement can take over.

Test Plan

Existing tests should pass — @algorandskiy found in #5809 that many tests depend on the desired no-backoff-and-quit-fast behavior in regular catchup.

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (948f08b) 55.77% compared to head (6476e36) 55.13%.

Files Patch % Lines
catchup/service.go 62.50% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5836      +/-   ##
==========================================
- Coverage   55.77%   55.13%   -0.65%     
==========================================
  Files         476      476              
  Lines       67166    67170       +4     
==========================================
- Hits        37463    37032     -431     
- Misses      27172    27575     +403     
- Partials     2531     2563      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

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

Makes sense for me

Copy link
Member

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

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

Looks good and SDK tests are passing with the same sleep time of 1s as before: https://app.circleci.com/pipelines/github/algorand/js-algorand-sdk/1284/workflows/bd4df97f-2ee0-4589-bf4e-fdc99e816bc1

@algorandskiy algorandskiy merged commit 7040500 into algorand:master Nov 16, 2023
27 of 29 checks passed
@cce cce deleted the backoff-follownode-catchup branch November 16, 2023 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants