dragonflyoss / Dragonfly2

Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project.
https://d7y.io
Apache License 2.0
2.3k stars 293 forks source link

feat: add garbage collection for persistent cache host #3642

Closed gaius-qi closed 2 weeks ago

gaius-qi commented 2 weeks ago

Description

Related Issue

Motivation and Context

Screenshots (if appropriate)

Types of changes

Checklist

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 128 lines in your changes missing coverage. Please review.

Project coverage is 35.66%. Comparing base (071ab91) to head (5d57d90). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
scheduler/resource/persistentcache/host_manager.go 0.00% 38 Missing :warning:
scheduler/resource/persistentcache/peer_manager.go 0.00% 35 Missing :warning:
...uler/resource/persistentcache/task_manager_mock.go 0.00% 18 Missing :warning:
...uler/resource/persistentcache/peer_manager_mock.go 0.00% 17 Missing :warning:
...uler/resource/persistentcache/host_manager_mock.go 0.00% 8 Missing :warning:
scheduler/resource/persistentcache/resource.go 0.00% 7 Missing :warning:
scheduler/scheduler.go 0.00% 5 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642/graphs/tree.svg?width=650&height=150&src=pr&token=PUICJYSAT7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) ```diff @@ Coverage Diff @@ ## main #3642 +/- ## ========================================== + Coverage 35.31% 35.66% +0.34% ========================================== Files 337 337 Lines 37652 37935 +283 ========================================== + Hits 13298 13530 +232 - Misses 23513 23562 +49 - Partials 841 843 +2 ``` | [Flag](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | `35.66% <0.00%> (+0.34%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | Coverage Δ | | |---|---|---| | [scheduler/scheduler.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642?src=pr&el=tree&filepath=scheduler%2Fscheduler.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3NjaGVkdWxlci5nbw==) | `0.00% <0.00%> (ø)` | | | [scheduler/resource/persistentcache/resource.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Fresource.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS9yZXNvdXJjZS5nbw==) | `0.00% <0.00%> (ø)` | | | [...uler/resource/persistentcache/host\_manager\_mock.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Fhost_manager_mock.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS9ob3N0X21hbmFnZXJfbW9jay5nbw==) | `47.91% <0.00%> (+47.91%)` | :arrow_up: | | [...uler/resource/persistentcache/peer\_manager\_mock.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Fpeer_manager_mock.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS9wZWVyX21hbmFnZXJfbW9jay5nbw==) | `0.00% <0.00%> (ø)` | | | [...uler/resource/persistentcache/task\_manager\_mock.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Ftask_manager_mock.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS90YXNrX21hbmFnZXJfbW9jay5nbw==) | `0.00% <0.00%> (ø)` | | | [scheduler/resource/persistentcache/peer\_manager.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Fpeer_manager.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS9wZWVyX21hbmFnZXIuZ28=) | `0.00% <0.00%> (ø)` | | | [scheduler/resource/persistentcache/host\_manager.go](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642?src=pr&el=tree&filepath=scheduler%2Fresource%2Fpersistentcache%2Fhost_manager.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3BlcnNpc3RlbnRjYWNoZS9ob3N0X21hbmFnZXIuZ28=) | `0.00% <0.00%> (ø)` | | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/dragonflyoss/Dragonfly2/pull/3642/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)