-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement delete for a given tag #116
Comments
By
I assume you mean in an external program? In my opinion, leaving the garbage collection to an external program is ok. The external program can periodically scan the list of images for all the blobs they contain, to update the reference counts. Yes, that could lead to races between GC and adding a new image, so as you say zot may be the best place for the blob GC to happen. While anything (e.g. skopeo) can delete a tag. |
No, I meant to do it in puzzlefs, but with no extra data attached to the blobs. So each time a tag is deleted, the entire puzzlefs repository is scanned, to see if the data blobs to be deleted have references from other tags. |
Yes, this is why I didn't want the manifest itself being a different format - but changing that's just not really an option. But people will use other ways of deleting images, so when you say "doing it in puzzlefs itself", if you mean adding a "puzzlefs gc", that is ok, but if you mean trying to force someone to use 'puzzlefs delete', that's just not going to fly. |
You mean a different format than JSON? |
that's not json |
And no, even if it was json that wouldn't suffice - for umoci gc to work, it would have to be a proper opencontainers image-spec manifest, with []layers. |
Yeah, we need figure out the integration with OCI and also reopen #55 when we have new ideas. |
Deleting a tag requires reference counting all the data blobs referenced by this particular tag. A blob can only be deleted if the tag to be deleted has the last reference to it, similar to a garbage collection algorithm. The reference counting can be done entirely in software, but if a puzzlefs store has too many tags, then it might be too slow. An alternative approach would be to keep the reference count on the disk, say in the puzzlefs image manifest.
Another thing to consider is integration with zot, which has its own garbage collection mechanism.
The text was updated successfully, but these errors were encountered: