Skip to content

Fix: enable WAL and batch writes in TelemetryStore to avoid SQLITE_BUSY under concurrency #560

Description

@selena731

Enable WAL mode and batch commits in TelemetryStore to prevent SQLITE_BUSY and reduce I/O.

Changes:

  • Set PRAGMA journal_mode=WAL and PRAGMA synchronous=NORMAL when opening TelemetryStore connection
  • Replace per-insert commit() with buffered/batched commits (e.g., commit every N inserts or time-based flush)
  • Add unit tests to simulate concurrent writes and verify no SQLITE_BUSY raised
  • Add migration notes if needed

Metadata

Metadata

Assignees

Type

Fields

Priority

P0

Effort

M

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions