Tay.Storage.Writer (tay v1.3.3)

Copy Markdown View Source

Internal physical storage session with a supervised native Port.

The GenServer serializes storage operations and supervises its linked helper. The helper alone holds flock and writable FDs. A failed or uncertain mutation poisons this instance; no automatic restart/retry is permitted. An embedding supervisor may start this temporary child explicitly. Physical readiness is not Event validation, job insertion, or semantic recovery readiness.

Strict group commits are private Engine-owned sessions: appends update the physical stream in order, one final sync/check closes the group, and the Engine alone withholds all external acknowledgements until that succeeds.

Summary

Functions

Activates once, in the same live ownership session; returns state input only after success.

Appends opaque physical bytes supplied by an upstream semantic validator.

Returns a specification to start this module under a supervisor.

Initialize only using the approved bootstrap/genesis protocol; never open existing history.

Replays an existing store, retaining its owner/Port/lock and private candidate.

Functions

activate_recovered(writer, session_ref)

Activates once, in the same live ownership session; returns state input only after success.

append(writer, type, schema, payload)

Appends opaque physical bytes supplied by an upstream semantic validator.

append(writer, admission_ref, type, schema, payload)

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

compact(writer, admission_ref, deadline \\ System.monotonic_time(:millisecond) + 900_000, retention \\ :infinity, captured_at \\ nil, cancel_flag \\ nil)

Runs the exclusive, drained-generation Store-v2 publisher in this native owner.

initialize(options)

Initialize only using the approved bootstrap/genesis protocol; never open existing history.

reduce(writer, accumulator, reducer)

rotate(writer)

rotate(writer, admission_ref)

seal(writer)

seal(writer, admission_ref)

start_link(options)

start_recovered_link(storage_options, replay_spec)

Replays an existing store, retaining its owner/Port/lock and private candidate.

status(writer)