atproto relay in zig zlay.waow.tech
relay zig atproto
Something went wrong. Try again.
mark DB success on did_cache hits master
isDbHealthy() is a 30s freshness check on last_db_success, but the markDbSuccess() call sites only fire on cache misses + the 10-min GC tick. with a hot did_cache in steady state, miss rate can dip for 30+ seconds, leaving the health flag stale and tripping k8s liveness probes even though the relay is healthy. cache hits use DB-derived data, so they're a valid signal that the data path is functioning. mark success on the fast path. cost is one clock_gettime + atomic store per ingestion event (~20 ns vDSO). the GC tick still provides real DB liveness as a backstop. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author zzstoatzz Co-author Claude Opus 4.6 (1M context) Date (Apr 6, 2026, 9:26 PM UTC) Commit fbdffbe3 fbdffbe3dcc0388121a948957f8c63d7f3274c27 Parent 3dc21b93 3dc21b93a0b52136cfc58c4f6b0d52b38ff56617