Artifact a2398a94e162c2de3a0668ab023143b9e2356b8f19a4e97e79b1f0b9120a6e33:
- File
internal/shun/purge.go
-
2026-10-24 02:27:29
— part of check-in
[c72c1245b8]
on branch main
— fix(sync): withhold pending pushed artifacts; judge them when filled (#471)
Third review of the seedcheck design:
- Withhold everything recorded, not just refusals. Every serving path (gimme/file, inventory and private igots, both clone paths, the client's file cards) now withholds any rid with a seedcheck row, pending or refused. A seed whose base a local check-in filled was served unjudged before. - Judge promptly. seedcheck.JudgeReadable judges, in one transaction, every pending row that has become readable, of any type: a seed is refused, anything else (files and non-artifacts too) loses its row, so withheld rows do not grow without bound. It runs in the transaction of each path that fills a basis: the dephantomize cascade, the sweep and rebuild (prepareCrosslinkTables), manifest.Checkin and tag.AddTag. Rows are walked in rid order through one cache, so a pending chain is expanded once. A row whose bytes fail their hash stays pending and withheld. - Forget on purge. shun.Purge drops seedcheck rows whose blob is gone (seedcheck.ForgetDeleted), since rids are reused. It is the only place blob rows are deleted. - One existence lookup per transaction. linkArtifact caches whether the table exists in the batch schedule, which is reset on commit and rollback. - Inventories read the withheld set fresh. The per-request cache serves gimme and clone only. Rows a request adds are its own unreadable deltas, which nothing can send, so the store-time and pre-inventory cache resets were unobservable and are gone. - The unsent delete on refusal is removed: only local writes fill unsent, so a pushed artifact is never in it.
Tests: - The check-in-fills-base case no longer sweeps explicitly. It shows the seed refused in the check-in's transaction and served to neither a clone nor a pulling peer. - A pending seed is not answered on gimme or announced. - A pending plain file is served once its base arrives. - A purged seed's rid, reused by an innocent blob, is not withheld. - A private inventory withholds a privately pushed seed. - A clone does not send a refused seed as a delta source. - Disabling any serving filter fails a test.
A clone of any store holding a dangling delta stalls at clone sequence 1. That is pre-existing and unrelated to seeds, so the pending-seed test checks pull and gimme instead. (user: [email protected], size: 3480) [annotate] [blame] [check-ins using]
-
2026-10-24 06:39:04
— part of check-in
[81d00b2e3b]
on branch main
— Merge branch 'feat/471-seed-refusal' into feat/horizon-names-seed-refusal
# Conflicts: # conformance/horizon_test.go # docs/site/data/conformance.json (user: [email protected], size: 3480) [annotate] [blame] [check-ins using]
-
2026-10-24 12:32:24
— part of check-in
[5a7c2ba12e]
on branch main
— Merge pull request #476 from danmestas/feat/horizon-names-seed-refusal
feat(horizon): named horizons with depth, and origin seed refusal (user: [email protected], size: 3480) [annotate] [blame] [check-ins using]
-
2026-10-24 02:27:29
— part of check-in
[c72c1245b8]
on branch main
— fix(sync): withhold pending pushed artifacts; judge them when filled (#471)