-
Notifications
You must be signed in to change notification settings - Fork 4k
Reconcile QQ node dead during delete and redeclare #14241
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
Open
LoisSotoLopez
wants to merge
4
commits into
rabbitmq:main
Choose a base branch
from
cloudamqp:qq_uuid_in_metadata_store
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
72a48e9
Reconcile QQ node dead during delete and redeclare
LoisSotoLopez 93101d4
Move get_nodes from amqqueue to rabbit_amqqueue
LoisSotoLopez 35ef780
wip: add feature flag and put RaUids in `nodes`
LoisSotoLopez f48962d
Update nodes entry on make_ra_conf
LoisSotoLopez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured out what I was doing wrong but I'm not sure what's the best approach to fix it. Let me recap and raise some questions.
So when a QQ is declared I am setting the
#{node() => ra_uid()}
map in the Queue Type State. I'll refer to those values in the map asNodeRaUid
s, as opposed to the UId associated to each QQ as a ra cluster ( the one generated by callingrabbit_quorum_queue:make_ra_conf
), which I'll refer to asClusterRaUid
.When a queue is deleted and re-declared the Queue Type state gets re-generated (no doubt about that because it's a new queue). Therefore between queue reincarnations the Queue Type state will change. However, the
ClusterRaUid
will not change for those nodes that were dead during the delete+redeclare.I was checking, on member recovery, whether the ClusterRaUid, as retrieved with
ra_directory:uid_of
, was associated to the current node in the map ofNodeRaUid
s. That's not right.My current approach is storing the
NodeRaUid
s map in disk, as it is done forClusterRaId
, and on recover compare that in-disk map with the one in theQueueTypeState
.My questions for you guys are: does that last paragraph sound right? and if it does, what API should I use to store that in-disk copy of the
NodeRaUid
s map? Is there anyra_
module that I could use?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we already store
ClusterRaId
that way, I guess we can persist more metadata that the Ra members won't otherwise have/preserve.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
ClusterRaUid
gets persisted throughra_directory.erl
which seems designed to strictly storing Ra cluster's specific pieces of related information. Maybe we just need aqq_nodes_uids
dets for the sole purpose of storing thoseNodeRaUid
s. Or using Rabbit's metadata storage.Edited: forget about this, found the error that led to this confusion.