Skip to content

Conversation

Desiki-high
Copy link
Collaborator

@Desiki-high Desiki-high commented Aug 5, 2023

Make sure not to write any labels in the content bucket.

Labels in db will cause the blobs of the same image to be related to each other and can only be cleaned at the same time.

  • not write in content.Store.Update.
  • not write in content.Writer.Commit.

We add LocalWriter to wrap writer in the content store to make sure not to write any labels in boltdb. In that case, we can make gc work well with the lease.

Changes:

  • add LocalWriter.
  • rewrite content.Writer.Commit method.

Ref: #141

@Desiki-high Desiki-high changed the title feat: add LocalWriter feat: add localWriter Aug 6, 2023
We add localWriter to wrap content.Writer in the content store to
make sure not to write any labels in boltdb by rewrite ```Commit``` method.
In that case, we can make gc work well with the lease.

Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
@imeoer imeoer merged commit 6493dc1 into goharbor:main Aug 7, 2023
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.

2 participants