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

feat: retry nodes in downloader #2165

Merged
merged 12 commits into from
Apr 17, 2024
Merged

Conversation

Frando
Copy link
Member

@Frando Frando commented Apr 9, 2024

Description

adds retries to #2085:

  • after a node fails to dial, or fails during a transfer with IO errors, we move the node into a delay queue, with an increasing timeout. once the delay expires, the node may be dialed again.
  • if the head of the download queue can only proceed with nodes which are currently in the retry queue, we park the download in a separate set from the main queue, and proceed with the next download
  • once a retrying node succeeds to reconnect, we unpark all parked hashes for which this node is a candidate

Notes & open questions

Has a smoke test for retry behavior. Adding more tests would be great.

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.

@Frando Frando changed the base branch from main to feat/downloader-next April 9, 2024 14:22
@Frando Frando force-pushed the feat/downloader-retry branch 6 times, most recently from dee77b0 to 6e2b25d Compare April 9, 2024 16:05
@dignifiedquire dignifiedquire added this to the v0.15.0 milestone Apr 10, 2024
@Frando Frando mentioned this pull request Apr 16, 2024
4 tasks
@Frando Frando force-pushed the feat/downloader-retry branch 2 times, most recently from 16dfd92 to a26222a Compare April 17, 2024 19:43
@Frando Frando force-pushed the feat/downloader-retry branch from 084ab39 to aa7b333 Compare April 17, 2024 23:30
@Frando Frando force-pushed the feat/downloader-retry branch from aa7b333 to bbd0155 Compare April 17, 2024 23:37
@Frando Frando merged commit ea734e9 into feat/downloader-next Apr 17, 2024
13 of 19 checks passed
ppodolsky pushed a commit to izihawa/iroh that referenced this pull request Apr 18, 2024
## Description

adds retries to the downloader:

* after a node fails to dial, or fails during a transfer with IO errors,
we move the node into a delay queue, with an increasing timeout. once
the delay expires, the node may be dialed again.
* if the head of the download queue can only proceed with nodes which
are currently in the retry queue, we *park* the download in a separate
set from the main queue, and proceed with the next download
* once a retrying node succeeds to reconnect, we unpark all parked
hashes for which this node is a candidate
ppodolsky pushed a commit to izihawa/iroh that referenced this pull request Apr 21, 2024
## Description

adds retries to the downloader:

* after a node fails to dial, or fails during a transfer with IO errors,
we move the node into a delay queue, with an increasing timeout. once
the delay expires, the node may be dialed again.
* if the head of the download queue can only proceed with nodes which
are currently in the retry queue, we *park* the download in a separate
set from the main queue, and proceed with the next download
* once a retrying node succeeds to reconnect, we unpark all parked
hashes for which this node is a candidate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants