This repository was archived by the owner on Jul 4, 2026. It is now read-only.
Commit de079d2
committed
fix: make digest delete retryable after partial tag unlink failure
DeleteManifestByDigest deleted the _digests copy first and then
unlinked matching tags. If tag unlinking failed partway, the digest
file was already gone — a retry hit the Exists/ErrNotFound early-exit
and never touched the surviving tag-addressed manifests. The claim that
catalog sync would reap those survivors was wrong: ManifestJSON reads
the tag file from object store directly, sync removes DB rows not
object store files, so any remaining tag file stayed fully reachable.
Unlink tags first, delete the digest copy last. unlinkTagsByDigest is
idempotent (object-store Delete swallows not-found, catalog
removeCatalogEntry is a no-op on missing entries), so a retry
re-enters, re-enumerates surviving tags, and resumes cleanup from
wherever the previous attempt failed.1 parent 9ba2f4f commit de079d2
1 file changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
140 | 146 | | |
141 | 147 | | |
142 | 148 | | |
| |||
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| |||
0 commit comments