Skip to content

[wicketd] make installinator_progress cancel safe#3579

Merged
sunshowers merged 5 commits into
mainfrom
sunshowers/spr/wicketd-make-installinator_progress-cancel-safe
Jul 13, 2023
Merged

[wicketd] make installinator_progress cancel safe#3579
sunshowers merged 5 commits into
mainfrom
sunshowers/spr/wicketd-make-installinator_progress-cancel-safe

Conversation

@sunshowers

@sunshowers sunshowers commented Jul 12, 2023

Copy link
Copy Markdown
Contributor

This code currently uses a Tokio mutex and is currently not cancel-safe
(RunningUpdate can be invalid across an await point). Make it
cancel-safe by using an unbounded receiver.

This means that we can replace Tokio's mutex with std::sync::Mutex, and make these methods synchronous.

Created using spr 1.3.4
Comment thread wicketd/src/installinator_progress.rs Outdated
Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
Created using spr 1.3.4
@sunshowers sunshowers enabled auto-merge (squash) July 12, 2023 23:53
@sunshowers sunshowers merged commit a7c7a67 into main Jul 13, 2023
@sunshowers sunshowers deleted the sunshowers/spr/wicketd-make-installinator_progress-cancel-safe branch July 13, 2023 02:01
sunshowers added a commit that referenced this pull request Aug 29, 2023
This was originally changed to an unbounded receiver in #3579, but in
the comments to RFD 400 it was pointed out that maybe we shouldn't give
up on backpressure. Switch to a watch channel, since we only care about
the last element anyway.

Also treat the receiver being closed as HTTP 410 Gone. We don't do
anything with this at the moment, but could abort installinator on
receiving this signal in the future.
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