Skip to content

rabbit_peer_discovery: Handle error/timeout when querying cluster members (backport #15568)#15569

Merged
dumbbell merged 1 commit intov4.2.xfrom
mergify/bp/v4.2.x/pr-15568
Feb 26, 2026
Merged

rabbit_peer_discovery: Handle error/timeout when querying cluster members (backport #15568)#15569
dumbbell merged 1 commit intov4.2.xfrom
mergify/bp/v4.2.x/pr-15568

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify bot commented Feb 26, 2026

Why

If rabbit_mnesia:members/0 hit an error, it always returned the node itself.

rabbit_khepri:members/0 returns an empty list to distinguish an error and let the caller handle it.

When peer discovery queries the cluster members ant it fails, it didn't handle the empty list so far. This led to errors while sorting nodes to determine which one to use as the cluster seed.

How

If rabbit_nodes:list_members/0 returns an empty list, the code assumes that the node is alone/unclustered (i.e. like what would be implicitly done if Mnesia was used).


This is an automatic backport of pull request #15568 done by Mergify.

…bers

[Why]
If `rabbit_mnesia:members/0` hit an error, it always returned the node
itself.

`rabbit_khepri:members/0` returns an empty list to distinguish an error
and let the caller handle it.

When peer discovery queries the cluster members ant it fails, it didn't
handle the empty list so far. This led to errors while sorting nodes to
determine which one to use as the cluster seed.

[How]
If `rabbit_nodes:list_members/0` returns an empty list, the code assumes
that the node is alone/unclustered (i.e. like what would be implicitly
done if Mnesia was used).

(cherry picked from commit c402032)
@dumbbell dumbbell merged commit 58db306 into v4.2.x Feb 26, 2026
295 checks passed
@dumbbell dumbbell deleted the mergify/bp/v4.2.x/pr-15568 branch February 26, 2026 10:30
@dumbbell dumbbell added this to the 4.2.5 milestone Feb 26, 2026
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.

1 participant