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 race condition with context close and confirm at the same time on DeferredConfirmation. #101

Merged
merged 2 commits into from
Jul 15, 2022

Conversation

sapk
Copy link
Contributor

@sapk sapk commented Jul 13, 2022

When doing more testing, I found one race condition is now possible with the PR #96.

This add test to detect the race condition and add basic solution to prevent to happen.

Sorry for this little possible bug.

One better way would be to use atomic with a uint32 as a bool but that imply potentially a lot of code change

@sapk sapk changed the title add failling concurrency test DeferredConfirmation: fix race condition with context close and confirm at the same time. Jul 13, 2022
@sapk sapk changed the title DeferredConfirmation: fix race condition with context close and confirm at the same time. fix race condition with context close and confirm at the same time on DeferredConfirmation. Jul 13, 2022
@lukebakken lukebakken self-assigned this Jul 15, 2022
@lukebakken lukebakken added this to the 1.4.0 milestone Jul 15, 2022
Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks!

@lukebakken lukebakken merged commit 66ddd64 into rabbitmq:main Jul 15, 2022
@sapk sapk deleted the fix-race-condition branch July 15, 2022 13:30
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.

3 participants