Skip to content

[04] DuckDB read layer + Parquet publish for /v3 - #22

Open
chondl wants to merge 7 commits into
cph-state-snapshotfrom
cph-duckdb-api
Open

[04] DuckDB read layer + Parquet publish for /v3#22
chondl wants to merge 7 commits into
cph-state-snapshotfrom
cph-duckdb-api

Conversation

@chondl

@chondl chondl commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Replacement for #10 (auto-closed by branch rename). Part of the cph-staging series.

chondl added 7 commits July 10, 2026 14:46
Content-address each table object under the v2/ prefix the reference-aware
GC already scans (v2/parquet/{year}/{table}.parquet.{digest}, immutable) and
record it in manifest.blobs under a parquet/ logical key. The manifest is
written last, so a reader resolving the set through it never joins tables from
different runs. Content-gate against the manifest digest keeps steady-state
uploads at zero.

The DuckDB read layer resolves the whole set from one manifest fetch per sync,
materializes the referenced objects into a per-generation cache dir (reusing
unchanged objects by hardlink), and swaps the active dir atomically; each query
captures the base dir once so it never spans two generations.
…ad failure

A3: the current-year cycle now writes the manifest exactly once, last, carrying
both site-blob and parquet entries, so DuckDB and the frontend never disagree by
a cycle and a crash between two writes cannot strand the API. A1: parquet no
longer does read-modify-write with 'read_manifest() or Manifest()' on the hot
path; the historical standalone writer aborts (logs + skips) when the manifest is
unreadable instead of fabricating an empty one that erases every site-blob ref.
A2: _teams_source falls back to a glob (which _query turns into an empty result)
instead of crashing on max([]), so /v3/team and /v3/teams return empty rather
than 500 on a first db-less deploy before the first pipeline cycle.
@chondl chondl changed the title [blob-store 4/5] DuckDB read layer + Parquet publish for /v3 (demonstrative) [04] DuckDB read layer + Parquet publish for /v3 Jul 19, 2026
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