Ferricstore.Store.PipelinePlanner (ferricstore v0.4.3)

Copy Markdown View Source

Core-owned pipeline routing precompute.

Server/protocol code may know command shape, but routing decisions belong in the store layer. The planner keeps namespace expansion, shard ownership, and keydir lookup together so batch read/write paths can avoid recomputing them per Router pass without moving store semantics into the RESP parser.

Summary

Functions

Plans client-visible keys and optional sandbox namespace expansion.

Plans keys that are already in their stored lookup form.

Types

key_plan()

@type key_plan() :: {binary(), binary(), non_neg_integer(), atom() | reference()}

Functions

plan_keys(ctx, keys, namespace)

@spec plan_keys(FerricStore.Instance.t(), [binary()], binary() | nil) :: [key_plan()]

Plans client-visible keys and optional sandbox namespace expansion.

The original key is retained for tracking/replies; the lookup key is the stored key used for routing and ETS/Bitcask access.

plan_lookup_keys(ctx, keys)

@spec plan_lookup_keys(FerricStore.Instance.t(), [binary()]) :: [key_plan()]

Plans keys that are already in their stored lookup form.