Ferricstore.Store.LocalTxStore (ferricstore v0.3.7)

Copy Markdown View Source

Transaction-local store context for MULTI/EXEC.

During a transaction, commands execute inside a shard's GenServer.call. For keys on the local shard, operations go directly to ETS (avoiding GenServer.call deadlock). For remote keys, operations delegate to Router.

This struct replaces the 445-line build_local_store closure factory. Store.Ops dispatches on this struct type.

Summary

Functions

Creates a LocalTxStore from shard state.

Types

t()

@type t() :: %Ferricstore.Store.LocalTxStore{
  instance_ctx: FerricStore.Instance.t(),
  shard_index: non_neg_integer(),
  shard_state: map()
}

Functions

new(state)

Creates a LocalTxStore from shard state.