rabbitmq / ra

A Raft implementation for Erlang and Elixir that strives to be efficient and make it easier to use multiple Raft clusters in a single system.
Other
798 stars 93 forks source link

Fixes to ra_leaderboard module #407

Closed kjnilsson closed 5 months ago

kjnilsson commented 6 months ago

Ensure that the members are updated when the membership is modifiied.

Always delete leaderboard record in ra server terminate callback to favour accuracy of leadership information over availability.

The idea is that when a record is not found in the leaderboard the caller falls back to some other, potentially slower, means of leader discovery.

kjnilsson commented 5 months ago

The test of rabbitmq/khepri#240 (to use ra_leaderboard:lookup_members/1) works with this patch!

It failed with Ra 2.7.1.

nice, thanks for testing, I'll release a new Ra patch