gc: add a policy to skip garbage collecting new blobs

We perform inline garbage collection of orphan blobs. However, the
dist-spec poses a problem because blobs begin their life as orphan blobs
and then a manifest is add which refers to these blobs.

We use umoci's GC() to perform garbage collection and policy support
has been added recently which can control whether a blob can be skipped
for GC.

In this patch, we use a time-based policy to skip blobs.
This commit is contained in:
Ramkumar Chinchani
2020-06-30 10:56:58 -07:00
parent 80244f1282
commit 324a517ea3
6 changed files with 50 additions and 6 deletions
+2 -2
View File
@@ -1504,8 +1504,8 @@ go_repository(
go_repository(
name = "com_github_opencontainers_umoci",
importpath = "github.com/opencontainers/umoci",
sum = "h1:nUULYM+jSLLJCVN2gd4wldm8/yuVMahC36UXna3jEqI=",
version = "v0.4.6",
sum = "h1:6JA6emg6B0/8EhBw8i010nkXCnB1skxW+FQPFDJDzoA=",
version = "v0.4.7-0.20200704224433-977db481b72c",
)
go_repository(