diff options
| author | Dan Engelbrecht <[email protected]> | 2022-06-08 10:41:37 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-06-08 10:41:37 +0200 |
| commit | 3091a1eaf204f89c0a6620ccb16c9d498e01d6ed (patch) | |
| tree | 43fafef9b119b0a667173fc61eeeb3ef18aed2f3 /zenserver/cache/structuredcachestore.cpp | |
| parent | Fix invalid xmake links in README (#124) (diff) | |
| parent | Use m_BucketDir for cache key context (diff) | |
| download | zen-3091a1eaf204f89c0a6620ccb16c9d498e01d6ed.tar.xz zen-3091a1eaf204f89c0a6620ccb16c9d498e01d6ed.zip | |
Merge pull request #123 from EpicGames/de/fix-gc-over-multiple-namespaces
We need to make each Cache Key contribution per bucket unique across namespaces
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
| -rw-r--r-- | zenserver/cache/structuredcachestore.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp index bc60a1d26..91e374ae2 100644 --- a/zenserver/cache/structuredcachestore.cpp +++ b/zenserver/cache/structuredcachestore.cpp @@ -1461,7 +1461,7 @@ ZenCacheDiskLayer::CacheBucket::GatherReferences(GcContext& GcCtx) } GcCtx.ContributeCids(Cids); - GcCtx.ContributeCacheKeys(m_BucketName, std::move(ExpiredKeys)); + GcCtx.ContributeCacheKeys(m_BucketDir.string(), std::move(ExpiredKeys)); } void @@ -1506,7 +1506,7 @@ ZenCacheDiskLayer::CacheBucket::CollectGarbage(GcContext& GcCtx) m_SlogFile.Flush(); - std::span<const IoHash> ExpiredCacheKeys = GcCtx.ExpiredCacheKeys(m_BucketName); + std::span<const IoHash> ExpiredCacheKeys = GcCtx.ExpiredCacheKeys(m_BucketDir.string()); std::vector<IoHash> DeleteCacheKeys; DeleteCacheKeys.reserve(ExpiredCacheKeys.size()); GcCtx.FilterCas(ExpiredCacheKeys, [&](const IoHash& ChunkHash, bool Keep) { |