symfonic.memory.backends.postgres_working_expiry_reads¶
postgres_working_expiry_reads ¶
Database discovery of what a read may return, for every backend process.
Two things hide stored rows from a read: the installed Working TTL barrier, and a CORE-199 erase job still erasing the row's subtree. Both are judged in the read's own statement, so one snapshot decides them together with the rows: a job commits before any of its content chunks, so a statement that sees a chunk's deletions also sees the job and hides what is left.
ReadVisibility
dataclass
¶
The TTL barrier function and the erase job table, either may be absent.
expiry_function
async
¶
One fresh catalog snapshot; partial/drifted installs fail closed.
Source code in src/symfonic/memory/backends/postgres_working_expiry_reads.py
read_visibility
async
¶
The TTL barrier, plus the erase job table for a native (or unknown) scope.
A v0 scope reads only v0 or NULL owner paths, which no canonical v1 job prefix can start, so it skips the job lookup.
Source code in src/symfonic/memory/backends/postgres_working_expiry_reads.py
visible ¶
Build only from internal SQL identifiers; caller values stay bound.
function is a ReadVisibility, or a bare TTL function name (or
None) as returned by expiry_function.