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

[v24.1.x] ssx: exit early from sleep_abortable if already aborted #23555

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #23540

Caught a few shutdown hangs in unit tests which I tracked down to
sleep_abortable being invoked with high durations after abort sources
where already aborted.

Do not try to sleep if abort source is already set. ss::sleep_abortable
behaves similarly from what I can read.

```
sleeper(typename Clock::duration dur, abort_source& as)
...
auto sc_opt = as.subscribe // returns empty optional if abort source is
already set
...
if (sc_opt) {...} else {
    done.set_exception(sleep_aborted());
}
```

(cherry picked from commit 9937975)
@vbotbuildovich vbotbuildovich added this to the v24.1.x-next milestone Sep 29, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Sep 29, 2024
@nvartolomei nvartolomei merged commit dd3ada3 into redpanda-data:v24.1.x Sep 30, 2024
18 checks passed
@BenPope BenPope modified the milestones: v24.1.x-next, v24.1.18 Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants