Skip to content

leader notify fun and leader query are served from two different sources #459

@Vagabond

Description

@Vagabond

You can register a notify_fun with riak_repl2_leader, yet the supported way to get the current leader is via the cluster_mgr. The cluster_mgr sets up its own notify fun to be updated of leadership changes, but it means that code triggering on a notify_fun change can't ask the cluster_mgr and be sure it is getting the right answer.
#451 changes the notify_fun order so that the cluster_mgr fun, which is registered first, will be run first, but it is still bad architecturally to have this disparity. We should have one canonical source for keadership notifications and queries. Whether we do that in the leader or in the cluster_mgr is undecided.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions