SuperCache.Cluster.Raft.Query (SuperCache v1.9.0)

Copy Markdown View Source

Raft-native query barriers for reads of Raft-managed partitions.

SuperCache keeps cache records in local ETS tables, so a query cannot return the data itself. Instead the Raft query path establishes the required ordering guarantee (local state, leader, or a voter quorum) before the caller reads the ETS partition.

Summary

Functions

Establish the query guarantee for mode on a Raft-managed partition.

Functions

barrier(mode, partition_idx, timeout \\ nil)

@spec barrier(atom(), non_neg_integer(), timeout() | nil) :: :ok | {:error, term()}

Establish the query guarantee for mode on a Raft-managed partition.

Returns :ok when Raft mode is inactive or the barrier succeeded, otherwise {:error, reason} for the caller to normalize.