store: compute template digests while publishing - #68
Merged
Conversation
Staging is single-writer under the template lock and every chunk read already fails on a short read; the extra per-file Lstat guarded nothing reachable.
Restatements, perf-advertising clauses, and cross-duplicated godoc go; contract sentences (locking, crash/retry, security invariants) stay.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
content_digestmeta field with the canonical 16 MiB chunked v2 store contractdigest-<gen>beside immutable exports, and commitmeta.jsonlastContentLength, and return marker metadata without another object requestPublishrecords digest-freeThe dir implementation is based on current
main's generation-addressed layout from #67. Hash/upload/sidecar failures leave the previous meta, export, and digest visible; a fresh retry commits one complete replacement.Validation
make go-testmake go-lintgo test -race ./store/dir -run '^(TestFetchPinsGenerationAcrossStoreInstances|TestDigestWorkersStoreChunksByOffset|TestPublishDigestedFailureAndFreshRetry|TestSweepGenerationsPairsCurrentAndSupersededDigests)$' -count=20go test -race ./pool -run '^(TestPromoteThenClaimClonesFromTemplate|TestRepromoteContentDigestTracksExportBytes)$' -count=20pool.gomethod-partition findings on unchangedmainlines 584/605/624RELEASE.2025-09-07T16-13-09Z: the 16 MiB + 1 real multipart upload matched the v2 vector; 64 MiB + 1 A/B (5 publishes/mode x 3) had overlapping ranges, with per-run medians plain 575/511/382 MB/s and digested 513/473/464 MB/s, so no fallback path was addedProduction diff: +590/-214 lines. Test and test-support diff: +962/-301 lines.
Closes #64