Skip to main content

Module read

Module read 

Source
Expand description

Typed readers over any NamespaceStore: the store::keys layouts and store::codec values in one place, so no backend reimplements them.

Structs§

RefPage
One page of list_refs.

Constants§

REPLAY_PRUNE_GRACE_MS
How long past its envelope’s expiry a replay record is kept. An envelope verifies while the verifier’s clock is at most its expiry, so a record pruned on a clock that runs ahead could let a replay through on a clock that runs behind. The grace exceeds any tolerated skew: the commit- deadline margin (SPEC-WRITE-GRANTS §5.5, 5 s) and the auth v2 clock lead (mkit_core::write_auth::MAX_CLOCK_LEAD_MS, 30 s).

Functions§

expired_replay_keys
Up to limit replay records whose envelopes expired before now_ms - REPLAY_PRUNE_GRACE_MS, as (index key, record key) pairs to delete. A record is written once per scope and never revived after its envelope expired, so the deletes need no precondition.
grant_epoch
The grant epoch; an absent key is epoch 0.
is_member
Repository-scoped pack membership, with an optional read-your-writes ref. Unknown or malformed hints are ignored (STC §7.9). Membership is checked in this repository’s index first, then in its strongly consistent ref shard.
list_refs
Up to limit refs of repo whose names start with prefix as raw bytes, after after. Names are returned in full. ListRefs passes crate::refs::list_scan_prefix so it matches at a component boundary (SPEC-REFS §4), then strips it.
members_many
Batch membership for one repository: check the consuming ref shard’s local rows first, then unresolved packs in their membership partitions. This is the hook point for §12.2’s deleted-repository generation rule.
quota_state
The current quota window of scope, if any.
read_ref
A ref’s id, if it exists.
replay_lookup
The replay record for scope, if any (PRD §5.4 stage 0).
stale_quota_keys
Up to limit quota windows of length window_ms that ended by now_ms, as (index key, quota key) pairs. A quota key is rewritten when its scope opens a new window, so the caller guards each quota-key delete with Equals on the value it read.