update issue #32

Open
opened 2024-12-18 11:36:40 +00:00 by hannes · 0 comments
Owner

So, an update consists of updating the git (git pull), dumping the git state, and then downloading tarballs that are not yet in the archive.

The trouble is that a download may stall since we don't timeout. And if such a download stalls, the entire "Lwt.async (sleep 1 hour >>= update)" stalls. And we'll never get to see updates again.

A good solution may be to add a timeout to the download process, as it is in normal TCP stacks with keep-alive... But a perfect timeout wouldn't be "this may only take 3 minutes", but instead "if there's no progress within Y minutes, consider this to be a failure".

So, an update consists of updating the git (git pull), dumping the git state, and then downloading tarballs that are not yet in the archive. The trouble is that a download may stall since we don't timeout. And if such a download stalls, the entire "Lwt.async (sleep 1 hour >>= update)" stalls. And we'll never get to see updates again. A good solution may be to add a timeout to the download process, as it is in normal TCP stacks with keep-alive... But a perfect timeout wouldn't be "this may only take 3 minutes", but instead "if there's no progress within Y minutes, consider this to be a failure".
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: robur/opam-mirror#32
No description provided.