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

fix(spooler): Make the backpressure management cancellation safe #4016

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

iambriccardo
Copy link
Member

@iambriccardo iambriccardo commented Sep 9, 2024

This PR makes the backpressure management of the spooler cancellation safe. The problem of the previous implementation was that we would take the future, await on it, and in case of a cancellation before the next poll, we would lose the future because it was taken, meaning that new envelopes would be pushed without backpressure to the project cache.

This PR introduces a fix which keeps the future's reference around until it has successfully completed.

#skip-changelog

Copy link
Member

Choose a reason for hiding this comment

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

This might anger the linter.

@iambriccardo iambriccardo marked this pull request as ready for review September 9, 2024 07:51
@iambriccardo iambriccardo requested a review from a team as a code owner September 9, 2024 07:51
@loewenheim loewenheim added the bug Something isn't working label Sep 9, 2024
@iambriccardo iambriccardo merged commit 0df2c08 into master Sep 9, 2024
37 of 40 checks passed
@iambriccardo iambriccardo deleted the riccardo/fix/cancellation-safety branch September 9, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants