pub struct InMemoryLfsRows { /* private fields */ }Expand description
The in-memory LFS row store — the semantically exact reference
impl, engine-free and single-process in the crate’s base (the
refs-tables’ pattern: no engine dependency, no feature beyond the
lfs gate this surface carries — ADR-025’s placement rule). Rows
live in a (repo_id, oid) → size sorted map (canonical order
falls out of the BTreeMap); the refcounts recompute from the map
on every mutation (exact-by-construction). The whole call runs
under one short-held write lock (the in-memory “transaction”; the
async tokio::sync::RwLock) over both maps — the rows and
the refcounts mutate in the same locked section, so a concurrent
pair of same-oid mutations serializes with exact recomputes (a
two-lock split would let interleaved phases land in reversed
order: a stale one-off undercount — the wave-9 gate’s fix).
Implementations§
Trait Implementations§
Source§impl Default for InMemoryLfsRows
impl Default for InMemoryLfsRows
Source§impl LfsRows for InMemoryLfsRows
impl LfsRows for InMemoryLfsRows
Source§fn assert<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
oid: &'life2 str,
size: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn assert<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
oid: &'life2 str,
size: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
(repo_id, oid) row with the
asserted size, or — when the pair already has a row — refresh
that row’s size and change nothing else (the refcount-aware
upsert: one oid re-asserted in one repo is one row).Source§fn remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
oid: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
oid: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn remove_repo<'life0, 'life1, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_repo<'life0, 'life1, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn rows<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LfsRow>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rows<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LfsRow>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
(repo_id, oid)
order.