Skip to content

feat(storage): SQLite PRAGMA tuning + Prometheus metrics - #49

Merged
Patel230 merged 7 commits into
mainfrom
feat/storage-pragma-metrics
Aug 15, 2026
Merged

feat(storage): SQLite PRAGMA tuning + Prometheus metrics#49
Patel230 merged 7 commits into
mainfrom
feat/storage-pragma-metrics

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Phase 1 SQLite hardening (3/5). Merges after #48.

  • Add applyPragmas: synchronous=NORMAL, wal_autocheckpoint=1000, temp_store=MEMORY, mmap_size=256MiB, page_size=4096, cache_size=-32768, recursive_triggers=ON, foreign_keys=ON, periodic PRAGMA optimize
  • Add storage/metrics.go with promauto Prometheus counters/histograms for storage operations

Merge order: after migrations (#48).

- applyPragmas(): synchronous=NORMAL, wal_autocheckpoint=1000, temp_store=MEMORY, mmap_size=256MB, page_size=4096, cache_size=32MB, recursive_triggers=ON, foreign_keys=ON, optimize
- Integrity check on open (PRAGMA integrity_check)
- Metrics: yaad_nodes_total, yaad_recall_duration_seconds, yaad_vector_search_duration_seconds, yaad_db_size_bytes, yaad_wal_size_bytes, yaad_lock_wait_seconds, yaad_schema_version, yaad_write_duration_seconds, yaad_migration_duration_seconds
- RecordMetrics() for periodic gauge updates
…fixes

CI triage on PR #49. lock.go carries the error-handling fix from the
process-lock branch ahead of merge.
…theus

- metrics.go/migrate.go: defer Close/Rollback, check PRAGMA Scan errors
- cmd/yaad-tui: go.sum entries for new prometheus dependency

CI triage on PR #49.
lock_unix.go/lock_windows.go carried over from the process-lock PR.
CI triage on PR #49.
@Patel230
Patel230 merged commit e72ddca into main Aug 15, 2026
12 checks passed
@Patel230
Patel230 deleted the feat/storage-pragma-metrics branch August 15, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant