Skip to content

arch: split SQLite read/write pools in ingestor (remove SetMaxOpenConns(1) single-pool architecture) #1742

@Kpa-clawbot

Description

@Kpa-clawbot

Context

All four reviewers in PR #1735 (round-1 review) noted that SetMaxOpenConns(1) on the ingestor is the underlying reason every long-running write pins all readers + writers behind it. The chunked-backfill fix in #1735 is a tactical workaround; the strategic fix is to split read/write connection pools.

Proposal

Split SQLite handles in cmd/ingestor:

  • One write handle with _journal_mode=WAL&_busy_timeout=N, SetMaxOpenConns(1).
  • One read handle with mode=ro, SetMaxOpenConns(N>1).
  • Long-running observability reads (status snapshots, perf endpoints inside the ingestor) go to the read handle and stop competing for the writer.

Why

Risk

  • Larger PR. WAL ordering semantics must be re-verified against bridge_handle_nodes + write-path tests. Worth a design doc first.

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