mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-27 04:43:59 +01:00
0a5fd7fdb8
The inventory of the sha256:* images and the manifest index that reference them is incomplete because it does not take into account any image older than the expiration limit. As a result some sha256:* will be considered orphaned although they are referenced from a manifest index that was created more recently than the expiration limit. There must not be any filtering based on the creation time when building the inventory. The expiration limit must only be taken into account when deleting orphaned images: those that are more recent than the expiration limit must not be deleted. This limit is specially important because it protects against a race between a cleanup task and an ongoing mirroring task. A mirroring task (such as skopeo sync) will first upload sha256:* images and then create the corresponding manifest index. If a cleanup races against it, the sha256:* images that are not yet referenced will be deleted without skopeo noticing and the published index manifest that happens at a later time will contain references to non-existent images. |
||
---|---|---|
.. | ||
blob_uploader.go | ||
cleanup.go | ||
cleanup_sha256.go | ||
common.go |