Closed illotum closed 5 months ago
@illotum our team would like to ask for another API extension. This one is fine for where it will be used in RabbitMQ, so I guess we can keep it.
The function we'd like to see is a version of ra:members/1
that would return a map with a more detailed view of cluster members.
ra:members_with_details/1
and ra:members_ext/1
are two named proposed. WDYT?
On second thought I think ra:members_info/1
would be a good name, effectively returning what's in the cluster
key of the ra_state()
map. The leader doesn't update it's own ra_peer_state()
so that needs to be filled in on the fly.
For sure! I usually lean towards minimal changes, but the extended API covers all my needs and more.
For sure! I usually lean towards minimal changes, but the extended API covers all my needs and more.
I think with all the peer info we can probably make better external decision on stuff like member changes without further probing. I have on a couple of occasions wished I could get this information in an easier way. ra:voters/1
is very specific the ra
module API is growing quite large and having a more generic function avoids us having to add yet another function in the future.
Following on the rabbitmq-server#10394 thread, lets revert this merge then and I'll go ahead with a proper member_info.
Done.
Proposed Changes
This is a small addition, high-level API to list voters of a Ra cluster. To be used wherever an active quorum list is needed instead of ra:members.
Types of Changes
Checklist
CONTRIBUTING.md
document