containerd / nydus-snapshotter

A containerd snapshotter with data deduplication and lazy loading in P2P fashion
https://nydus.dev/
Apache License 2.0
172 stars 99 forks source link

Make RAFS independent of daemon #528

Closed jiangliu closed 1 year ago

jiangliu commented 1 year ago

Originally RAFS instances are always associated with daemons, or daemon owns RAFS instance. With introduction of tarfs, rafs may be independent of daemon. So refactor rafs and daemon related code to make RAFS independent of daemon.

codecov[bot] commented 1 year ago

Codecov Report

Merging #528 (d646992) into main (9a2575b) will increase coverage by 0.40%. The diff coverage is 21.81%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528/graphs/tree.svg?width=650&height=150&src=pr&token=R3RX5WX6R1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd)](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd) ```diff @@ Coverage Diff @@ ## main #528 +/- ## ========================================== + Coverage 37.55% 37.95% +0.40% ========================================== Files 60 61 +1 Lines 7139 7053 -86 ========================================== - Hits 2681 2677 -4 + Misses 4146 4064 -82 Partials 312 312 ``` | [Files Changed](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd) | Coverage Δ | | |---|---|---| | [pkg/daemon/daemon.go](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL2RhZW1vbi9kYWVtb24uZ28=) | `0.00% <0.00%> (ø)` | | | [pkg/manager/daemon\_adaptor.go](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL21hbmFnZXIvZGFlbW9uX2FkYXB0b3IuZ28=) | `0.00% <0.00%> (ø)` | | | [pkg/manager/daemon\_event.go](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL21hbmFnZXIvZGFlbW9uX2V2ZW50Lmdv) | `0.00% <0.00%> (ø)` | | | [pkg/manager/manager.go](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL21hbmFnZXIvbWFuYWdlci5nbw==) | `0.00% <0.00%> (-14.89%)` | :arrow_down: | | [pkg/store/daemonstore.go](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL3N0b3JlL2RhZW1vbnN0b3JlLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/system/system.go](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL3N5c3RlbS9zeXN0ZW0uZ28=) | `5.48% <0.00%> (ø)` | | | [pkg/store/database.go](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL3N0b3JlL2RhdGFiYXNlLmdv) | `44.16% <62.50%> (ø)` | | | [pkg/store/database\_compat.go](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL3N0b3JlL2RhdGFiYXNlX2NvbXBhdC5nbw==) | `76.64% <87.50%> (ø)` | | | [pkg/manager/daemon\_cache.go](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL21hbmFnZXIvZGFlbW9uX2NhY2hlLmdv) | `94.64% <94.64%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/containerd/nydus-snapshotter/pull/528/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd)