Skip to content

Fix incorrect unbind queue after recovery connection #1205

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 1 commit into from
May 13, 2022

Conversation

MIVerTFT
Copy link

@MIVerTFT MIVerTFT commented May 13, 2022

Proposed Changes

It seems to me that there is an error in the connection recovery code. The error is that when restoring a binding between the exchange and the server-named queue, there is a change in the "RecordedQueueBinding.Destination" that affects the hash, which makes it impossible to delete records from the _recordedBindings dictionary, since the dictionary does not re-calculate the hash value. This situation eventually leads to the fact that all subsequent connection shutdown will not be correctly restored.

The written test demonstrates this problem.

Types of Changes

  • 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

  • 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

If this is a relatively large or complex change, kick off the discussion by
explaining why you chose the solution you did and what alternatives you
considered, etc.

@pivotal-cla
Copy link

@MIVerTFT Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@MIVerTFT Thank you for signing the Contributor License Agreement!

@michaelklishin michaelklishin merged commit 05ca318 into rabbitmq:6.x May 13, 2022
@michaelklishin michaelklishin added this to the 6.3.1 milestone May 13, 2022
@michaelklishin
Copy link
Contributor

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

@MIVerTFT
Copy link
Author

MIVerTFT commented May 14, 2022

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

@michaelklishin

main doesn't have this bug. Apparently, when they redid RecordedBinding from a class to a structure, they fixed it.

@michaelklishin
Copy link
Contributor

Yup, I've just found out just as much. Thank you for confirming @MIVerTFT.

@MIVerTFT MIVerTFT deleted the fix-unbind branch May 24, 2022 06:02
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