Skip to content

Improve consistence to delete manifest#1137

Closed
xiekeyang wants to merge 1 commit intodistribution:masterfrom
xiekeyang:del-tag
Closed

Improve consistence to delete manifest#1137
xiekeyang wants to merge 1 commit intodistribution:masterfrom
xiekeyang:del-tag

Conversation

@xiekeyang
Copy link
Copy Markdown

Currently, deleting manifest uses manifestStore.Delete function.
However, it only delete revision link, and its tag blob link files still exist.
It leads problem that user can still view the deleted tag in tags list.
I think tag blob links should be deleted consistently. We can add tagStore.delete to manifestStore.Delete to do it.
This PR is only for resolving a consistence, and there are still improvement need to do for soft deleting.

Signed-off-by: xiekeyang xiekeyang@huawei.com

This PR is only for resolving consistence, to delete
revision and tag blob links.

Signed-off-by: xiekeyang <xiekeyang@huawei.com>
@stevvooe
Copy link
Copy Markdown
Collaborator

This actually makes deletion less consistent. It takes the deletion of one item and replaces it with 4 round trips to the backend, any of which can fail. It then tests for existence, making the decision to delete something, without holding any lock to ensure that item still exists. Even more so, it then deletes the tag from the tag store, which may reference other manifests, corrupting the data store.

This PR actually makes it less consistent, racy and corrupts the data backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants