Skip to content

Make writer contention and uninterruptible I/O states observable #592

Description

@EtanHey

Incident evidence

The 2026-07-13 Tier-0 incident included a WriterInUseError, and long-running health/watch/drain processes were observed in macOS U (uninterruptible wait) state while the 16 GB database was under I/O pressure. The Tier-0 health check now backs off rather than repeatedly kickstarting a U/D process, but the underlying writer/I/O contention remains.

Follow-up

  • Correlate writer ownership, queue depth, WAL size, checkpoint activity, and process state
  • Emit bounded diagnostics when the writer lease is held unusually long
  • Make U/D backoff and escalation visible in operator telemetry
  • Define thresholds that distinguish expected bursts from persistent contention
  • Add a reproducible load test for writer arbitration under checkpoint/enrichment pressure

Safety

Preserve one-writer-at-a-time semantics. Do not solve this by weakening the writer lock, killing active writers, or mutating the canonical DB during diagnosis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions