diff options
| author | Dan Engelbrecht <[email protected]> | 2023-10-02 10:58:47 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-02 10:58:47 +0200 |
| commit | 3259b5a7f90f374ea75af469f07a29020d6c9c2d (patch) | |
| tree | 3437f75b24c531905cf4b4ce5957d685ce3c2e08 /src/zenstore/compactcas.cpp | |
| parent | Sentry username fix (#435) (diff) | |
| download | zen-3259b5a7f90f374ea75af469f07a29020d6c9c2d.tar.xz zen-3259b5a7f90f374ea75af469f07a29020d6c9c2d.zip | |
lightweight gc (#431)
- Feature: Add lightweight GC that only removes items from cache/project store without cleaning up data referenced in Cid store
- Add `skipcid` parameter to http endpoint `admin/gc`, defaults to "false"
- Add `--skipcid` option to `zen gc` command, defaults to false
- Add `--gc-lightweight-interval-seconds` option to zenserver
Diffstat (limited to 'src/zenstore/compactcas.cpp')
| -rw-r--r-- | src/zenstore/compactcas.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zenstore/compactcas.cpp b/src/zenstore/compactcas.cpp index 63158f6de..a138e43e9 100644 --- a/src/zenstore/compactcas.cpp +++ b/src/zenstore/compactcas.cpp @@ -388,6 +388,11 @@ CasContainerStrategy::CollectGarbage(GcContext& GcCtx) { ZEN_TRACE_CPU("CasContainer::CollectGarbage"); + if (GcCtx.SkipCid()) + { + return; + } + // It collects all the blocks that we want to delete chunks from. For each such // block we keep a list of chunks to retain and a list of chunks to delete. // |