Commit Graph

7 Commits

Author SHA1 Message Date
Derek McGowan
00596f400e
Add gc policy plugin
Add garbage collection as a background process and policy
configuration for configuring when to run garbage collection.
By default garbage collection will run when deletion occurs
and no more than 20ms out of every second.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-11-20 16:57:39 -08:00
Michael Crosby
e74c423f78 Fix races with concurrent GC
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-27 14:47:23 -04:00
Michael Crosby
b6e0c4f321 Fix go lint errors
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-25 15:26:44 -04:00
Derek McGowan
17471d5592
Metadata garbage collection
Marks and sweeps unreferenced objects.
Add snapshot cleanup to metadata.
Add content garbage collection

Add dirty flags for snapshotters and content store which
are set on deletion and used during the next garbage collection.
Cleanup content store backend when content metadata is removed.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-10-11 10:42:47 -07:00
Aaron.L.Xu
08bcbddb32 fix typo I found in this repo
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-01-20 01:18:26 +08:00
Stephen J Day
b52cf8b440 gc: remove erroneous file
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-12 21:09:40 -08:00
Stephen J Day
b542cc19ad
gc: add toy tri-color GC implementation
As a minimum, we would like to maintain generic garbage collection of
containerd resources. This includes images, bundles, containers and
arbitrary content.

The included implementation is just a textbook toy that we can use to
inform the requirements of gc. It implements a simple, stack-based
tricolor algorithm. Nothing special.

Mostly, this is to ensure we think about garbage collection from the
start, rather than as an afterthought or follow on feature.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-06 16:20:40 -08:00