very fast at protocol indexer with flexible filtering, xrpc queries, cursor-backed event stream, and more, built on fjall
rust fjall at-protocol atproto indexer

[db] document and test ephemeral ttl changes across restarts master

HYDRANT_EPHEMERAL_TTL is applied on every tick against watermarks persisted in cursors, so changing it between restarts changes the cutoff right away, but nothing said what shrinking or growing it does or covered either direction. docs/concepts/retention.md now explains the watermark mechanism, what a shrink and a grow do across a restart, why the cut is only as fine as the watermarks (one a minute, none while down), and the boundary table lag from drop_range. no behavior changes. the new event_ttl_tests in src/db/ephemeral.rs write real ephemeral events into separate tables with the watermarks a running worker would have left, then reopen the database with a shorter or longer ttl and tick. they check that a shrink prunes on the first tick and a grow keeps what is left and brings nothing back, that inline event bodies replay while their events are kept and go with them, and that a table straddling the cutoff outlives the ttl. picking the oldest watermark instead of the newest one past the cutoff fails the shrink and grow tests (event 3 should be pruned), and storing ephemeral events as pointers instead of inline blocks fails all three (event lost its body). covers hydrant-4r4.


+221 -2
3 changed files