RaftFleet.ProcessAndDiskLogIndexInspector (raft_fleet v0.10.2) View Source

A GenServer that reports "eligibility" of a node for hosting the 1st member of a new consensus group.

When starting a new consensus group, a manager process collects reports from all active nodes and determine where to spawn the 1st member process. The report includes:

  • whether there exists a process whose registered name equals to the consensus group name
  • last log index in locally stored files (if any)

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for GenServer.init/1.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

find_node_having_latest_log_index(name)

View Source

Specs

find_node_having_latest_log_index(atom()) ::
  {:ok, nil | node()} | {:error, :process_exists}

Callback implementation for GenServer.init/1.

Specs

start_link([]) :: {:ok, pid()}