feat: per-projection SQLite database for independent rebuild #162
Labels
No labels
bug
documentation
enhancement
investigation
nice-to-have
performance
production-ready
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ash/eskit#162
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Currently apps pass one
*sql.DBto all projections. All tables live in one SQLite file. Changing any projection requires rebuilding ALL projections.Target
Each
sqlview.Configopens its own SQLite database file. Directory structure:Why
API Change
The
Collectorcreates{Name}.dbfor each registered StateView. Setup creates the table in that DB. Checkpoint is either in the same DB or a separate checkpoint DB per projection.Implementation
projection.Collectoraccepts a directory pathAdd(view): opens{dir}/{view.Name}.db, passes*sql.DBto the viewSetup()runs migrations per DBDirnot set, falls back to shared DB modeScope
projection.Collectorchangesinternal/app/app.gopasses directory instead of single DB--rebuild-projection=namedeletes specific DB filePriority
High — blocks optimal zero-downtime deployment strategy.