M2: split aco.duckdb into per-domain files + ATTACH #511
Reference in New Issue
Block a user
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?
data/aco.duckdbis one ~3.2 GB file for all schemas (aco,opps,pfs,bib, …), so a reader of any schema blocks a writer of any other. Split intoper-domain DB files (
opps.duckdb,pfs.duckdb, …) andATTACHthem forcross-domain queries. A domain ingest then only contends with readers of that
domain.
Scope:
conf.path/conf.connectfor per-domain DBs;ATTACHhelper;migrate the ingest scripts; keep
aco.duckdbas the analytics/joined store.Background:
docs/superpowers/specs/2026-07-08-duckdb-concurrency-streaming.md(option D).Closing as superseded / deferred. The two shipped M1/M2 fixes removed this issue's driving pain:
aco.ro.duckdbsnapshot — notebook readers never hold the primary's lock, so reader-vs-writer contention (the recurring failure) is gone.What a split would still buy is writer-vs-writer concurrency (parallel domain ingests + pipe runs) and cheaper per-domain replica publishing — real but modest, while the cost is high: migrating ~9 skin_subs writer scripts plus the PFS load path, and a required destructive
DROP SCHEMAon the monolith (an in-monolith schema shadows an attached catalog of the same name, so keeping both silently serves stale data).Meanwhile the strategic path (M3 #512 → M5 #514) moves reference data to the lake with true multi-writer snapshot isolation and retires the monolith for reference data anyway — making this split a throwaway intermediate. Proceeding directly to the #512 DuckLake-vs-Iceberg spike.
Reopen if: overlapping writers become a real operational need before the lake path lands (e.g. scheduled ingests start colliding with
aco.piperuns).