Ferricstore.CrossShardOp (ferricstore v0.9.1)

Copy Markdown View Source

Execution boundary for multi-key operations that may span storage shards.

Same-shard commands use a direct store with no coordination overhead. Standalone instances coordinate multiple local shards under barriers and use the standalone compensation journal. Durable commands spanning independent Raft groups fail with CROSSSLOT; FerricStore does not expose a cross-group mutation protocol without crash-safe commit, rollback, and read snapshots.

Summary

Types

Role for a key in a multi-key operation.

Key with its role in the operation.

Functions

Executes a multi-key operation in the caller's storage context.

Types

key_role()

@type key_role() :: :read | :write | :read_write

Role for a key in a multi-key operation.

key_with_role()

@type key_with_role() :: {binary(), key_role()}

Key with its role in the operation.

Functions

execute(keys_with_roles, execute_fn, opts \\ [])

@spec execute([key_with_role()], (map() -> term()), keyword()) :: term()

Executes a multi-key operation in the caller's storage context.

Durable contexts reject keys that span independent Raft groups. Non-Raft contexts retain the local journaled coordinator.