Skip to content

Fix perpetual auto-recovery problem #1203

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

Merged
merged 2 commits into from
May 11, 2022
Merged

Fix perpetual auto-recovery problem #1203

merged 2 commits into from
May 11, 2022

Conversation

mot256
Copy link
Contributor

@mot256 mot256 commented May 11, 2022

Proposed Changes

We have found an issue where if a consumer of an auto-delete queue is cancelled, the auto-recovery will fail perpetually.

After debugging we found that, when a consumer of an auto-delete queue is cancelled, the recording of the queue is removed from the auto-recovery list, but the associated bindings were not removed from the recording. Leading to a perpetual error stating that the binding cannot be done because the queue does not exist.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

You will also note that I fixed inconsistent locking that could lead to further auto-recovery issues due to _recordedBindings variable not being locked with the same lock while reading and writing.

@michaelklishin
Copy link
Contributor

michaelklishin commented May 11, 2022

Your description of the problem and proposed solution make sense to me.

@mot256 mot256 marked this pull request as ready for review May 11, 2022 16:57
@michaelklishin michaelklishin added this to the 6.3.1 milestone May 11, 2022
@michaelklishin michaelklishin merged commit 480c739 into rabbitmq:6.x May 11, 2022
@michaelklishin
Copy link
Contributor

@mot256 thank you. Can you please submit the same change against main?

michaelklishin added a commit that referenced this pull request May 11, 2022
Fix perpetual auto-recovery problem

(cherry picked from commit 480c739)
@michaelklishin
Copy link
Contributor

I cherry-picked this to 7.x but main uses file-scoped namespaces, so cherry-picking cannot apply cleanly. It may be more practical to submit the same PR for main.

@lukebakken lukebakken self-assigned this May 11, 2022
@mot256
Copy link
Contributor Author

mot256 commented May 12, 2022

@mot256 thank you. Can you please submit the same change against main?

Will do. Thanks.

@mot256 mot256 deleted the 6.x branch May 12, 2022 14:24
@mot256 mot256 mentioned this pull request May 12, 2022
11 tasks
@mot256
Copy link
Contributor Author

mot256 commented Jun 8, 2022

@michaelklishin when are you planning to release 3.6.1 that will include this fix? We are having issues in production that are directly linked to this issue.

@michaelklishin
Copy link
Contributor

I cannot make any ETA promises but we can try to ship a patch release this week.

@lukebakken
Copy link
Collaborator

lukebakken commented Jun 8, 2022

Sorry it didn't seem that urgent. I'll get a release done within the next few hours.

@lukebakken
Copy link
Collaborator

@mot256 - https://www.nuget.org/packages/RabbitMQ.Client/6.3.1

I'm getting the release details sorted out here right now. Thanks again for your contribution.

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