Skip to content

Conversation

Desiki-high
Copy link
Collaborator

@Desiki-high Desiki-high commented May 25, 2023

We should use the bolt database to manage local blob caches.

Changes:

  1. We will create the meta.db in work_dir, and the content store works in work_dir/content. The db will sync with the local blob caches.
  2. Add new struct content. It will include the db and provide methods: GC Size. We can add more features to the content.
  3. Add config gcpolicy.threshold: the maximum capacity of the local cache storage, if local caches size is over threshold, GC will start.
  4. CheckHealth API will check if the db is live by trying to calculate the sum size of conten store

Reference: #141.

@Desiki-high Desiki-high force-pushed the feat-boltdb branch 6 times, most recently from b5846c2 to 88055cf Compare May 26, 2023 10:30
@Desiki-high Desiki-high changed the title [WIP]feat: add bolt database feat: add bolt database May 26, 2023
@Desiki-high
Copy link
Collaborator Author

@imeoer Please help use https://github.com/dcoapp/app to replace the .github/workflows/dco-check.yml, thanks. I just don't want to see any warnings in ci 😂.

@Desiki-high Desiki-high changed the title feat: add bolt database feat: add bolt database to manage local cache May 30, 2023
@Desiki-high Desiki-high force-pushed the feat-boltdb branch 3 times, most recently from 4af6182 to 4786a46 Compare May 30, 2023 07:38
@Desiki-high Desiki-high requested a review from imeoer May 30, 2023 07:45
@Desiki-high Desiki-high force-pushed the feat-boltdb branch 2 times, most recently from d5a5bb9 to 27c1802 Compare May 30, 2023 08:48
@Desiki-high Desiki-high requested a review from imeoer May 30, 2023 08:51
gcpolicy.threshold is the maximum capacity of the local caches storage,
if local caches size over threshold, gc will start. And we can add more policy
in the future.

Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
Content include the db, we can use db to manage local content store.
Content support gc and calculate the sum size of conten store.

Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
@Desiki-high Desiki-high requested a review from imeoer May 30, 2023 09:05
@imeoer imeoer merged commit 64f87fe into goharbor:main May 30, 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