Skip to content

fix(TC-2917): bound artifact replacement and preserve WAL bases - #597

Draft
samgbafa wants to merge 3 commits into
skgbafa/tc-2917-chunked-duckdbfrom
skgbafa/tc-2917-part-lifecycle
Draft

samgbafa wants to merge 3 commits into
skgbafa/tc-2917-chunked-duckdbfrom
skgbafa/tc-2917-part-lifecycle

Conversation

@samgbafa

Copy link
Copy Markdown
Contributor

Follow-up to #591 for TC-2917. Keeps chunked artifact storage disabled by default.

Makes replacement contention retryable (503 without checkpoint back-off), keeps artifact/account limits at 507 and ordinary space growth at 402, prioritizes predecessor reclamation, and lets collection continue past locked or failed owners. Protects committed uploads from delayed abort cleanup. Old-format databases fall back to a full snapshot when WAL publication has no chunked checkpoint.

DuckDB WAL saves now verify the local checkpoint length and CID under the actor fence before capturing WAL; a changed main file forces a full checkpoint. Carries the independent #594 fix into the owned transfer path.

Validation: 1,171 DuckDB-enabled core tests pass, core/test and server Clippy pass, and both node HTTP mapping tests pass on local throwaway PostgreSQL 18.6. Targeted tests cover committed-publish abort, locked-owner collection, large predecessor replacement, legacy fallback, lost publish replies, and cold reload after a 300,000-row DuckDB write. Three deliberate regressions (reference guard, fail-fast collection, predecessor priority) are caught.

Remaining before enabling: DuckDB filesystem cleanup and disk bounds, existing-database conversion, and ceiling-load acceptance. This PR does not enable the feature.

Test-ruling: TC-2917 — approved changes to this stack’s new tests: simultaneous replacement expects retryable contention rather than capacity refusal; true quota overflow remains 507; DuckDB artifact cap expects 507 while space growth stays 402; combined artifact cap and account quota are separated (1024/4096); WAL lifecycle checks accounting after an intermediate chunk deletion; CAS/reclamation explicitly collects superseded parts before asserting retained bytes. Includes the requested three-chunk abort-after-committed-publish regression. No other existing test edits.

@samgbafa
samgbafa force-pushed the skgbafa/tc-2917-chunked-duckdb branch from b793045 to c251b72 Compare November 14, 2026 01:41
@samgbafa
samgbafa force-pushed the skgbafa/tc-2917-part-lifecycle branch from 00d516f to c441b37 Compare November 14, 2026 01:41

This branch has not been deployed

No deployments
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