Skip to content

db: add busy_timeout pragma to getDb() — concurrent-writer lock contention #72

@edheltzel

Description

@edheltzel

Source: PR #59 re-review. While re-verifying the backup TOCTOU fix, the reviewer found that concurrent invocations mostly fail loudly with database is locked at getDb() open — lock contention dominated the original 4-concurrent-backups reproduction.

The failures are loud and lossless (no data risk), but any concurrent CLI/MCP/hook usage hits them unnecessarily.

Fix sketch: PRAGMA busy_timeout (e.g. 3000-5000ms) in the shared getDb() connection setup; also directly mitigates #68's locked-swallow pressure.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestneeds-triageMaintainer needs to evaluate this issue

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions