Skip to content

catchup: use specialized backoff behavior for follower mode#5836

Merged
algorandskiy merged 1 commit intoalgorand:masterfrom
cce:backoff-follownode-catchup
Nov 16, 2023
Merged

catchup: use specialized backoff behavior for follower mode#5836
algorandskiy merged 1 commit intoalgorand:masterfrom
cce:backoff-follownode-catchup

Conversation

@cce
Copy link
Copy Markdown
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.

@codecov
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor

@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

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.

4 participants