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

Peer discovery cleanup: be more defensive #12809

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Conversation

michaelklishin
Copy link
Member

@michaelklishin michaelklishin commented Nov 25, 2024

See discussion #12807 for details. This is to avoid an exception when
the cleanup functions perform peer discovery and may get a single node back
instead of a list.

rabbit_peer_discovery:normalize/1 can be
changed to only return lists of nodes but then
there is a number of core code paths that
treat a single node as a special "preselected" value.

So let's keep that part and convert both
sets of nodes to lists before computing the
difference.

See discussion #12807 for details.

rabbit_peer_discovery:normalize/1 can be
changed to only return lists of nodes but then
there is a number of core code paths that
treat a single node as a special "preselected"
value.

So let's keep that part and convert both
sets of nodes to lists before computing the
difference.
@michaelklishin
Copy link
Member Author

Per discussion with @dumbbell: indeed, the "single value" results of peer discovery is a special case introduced intentionally to allow for a modified seeding (see RabbitMQ 4.0 release notes for details) by certain backends.

The cleanup module simply wasn't updated to account for that.

@michaelklishin michaelklishin merged commit dba6345 into main Nov 25, 2024
272 checks passed
@michaelklishin michaelklishin deleted the mk-rabbitmq-server-12807 branch November 25, 2024 18:44
michaelklishin added a commit that referenced this pull request Nov 25, 2024
Peer discovery cleanup: be more defensive (backport #12809)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant