ExESDB.ConsistencyChecker (ex_esdb v0.1.4)
Provides tools for verifying consistency across ExESDB cluster stores.
This module leverages Khepri and Ra APIs to verify that stores are consistent across cluster nodes, detect split-brain scenarios, and ensure data integrity.
Summary
Functions
Checks Raft log consistency across cluster members. This is a more intensive check that examines log indices and terms.
Quick health check to verify if a store is accessible and responsive across nodes.
Monitors consistency over time and reports any deviations.
Performs a comprehensive consistency check across all cluster nodes for a given store.
Verifies that all nodes agree on cluster membership.
Types
Functions
@spec check_raft_log_consistency(store_id()) :: check_result()
Checks Raft log consistency across cluster members. This is a more intensive check that examines log indices and terms.
@spec quick_health_check(store_id()) :: check_result()
Quick health check to verify if a store is accessible and responsive across nodes.
@spec start_consistency_monitoring(store_id(), pos_integer()) :: {:ok, pid()}
Monitors consistency over time and reports any deviations.
@spec verify_cluster_consistency(store_id()) :: check_result()
Performs a comprehensive consistency check across all cluster nodes for a given store.
Returns
{:ok, report}
- Detailed consistency report{:error, reason}
- Error occurred during check
Example
iex> ExESDB.ConsistencyChecker.verify_cluster_consistency(:my_store)
{:ok, %{
status: :consistent,
nodes_checked: 3,
leader: :"node1@host",
members: [:"node1@host", :"node2@host", :"node3@host"],
raft_status: :healthy,
potential_issues: []
}}
@spec verify_membership_consensus(store_id()) :: check_result()
Verifies that all nodes agree on cluster membership.