Skip to content

fix: don't ignore join_next() errors in background_fetch_any() - #8686

Open
link2xt wants to merge 1 commit into
mainfrom
link2xt/try-join-next
Open

link2xt wants to merge 1 commit into
mainfrom
link2xt/try-join-next

Conversation

@link2xt

@link2xt link2xt commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

join_next() failing means something went really wrong, e.g. panic inside a task. We also don't cancel the tasks other than by dropping JoinSet, so join_next() should never return an error.

Follow-up to #8592

@link2xt
link2xt force-pushed the link2xt/try-join-next branch from 134010f to b59d511 Compare September 14, 2026 00:55
join_next() failing means something went really wrong, e.g. panic inside a task.
We also don't cancel the tasks other than by dropping JoinSet,
so join_next() should never return an error.
@link2xt
link2xt force-pushed the link2xt/try-join-next branch from b59d511 to 8acdda4 Compare September 14, 2026 01:03
@link2xt
link2xt marked this pull request as ready for review September 14, 2026 01:07
Comment thread src/scheduler.rs

while let Some(fetched) = set.join_next().await {
if let Ok(true) = fetched {
if fetched.context("background_fetch_any: Failed to join a task")? {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ASFAIU the error case can not happen in a release build: if join_next fails the whole process dies before it bubbles here. And if it happens in non-release builds, we should maybe just log an error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants