aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-06-07 22:27:13 +0200
committerDan Engelbrecht <[email protected]>2022-06-07 22:27:13 +0200
commit3f3e91a6a1721a1a532ed296dd6e830fcfda8118 (patch)
tree887596c8f2c00199df6f722d15576a047c2b9f15 /zenserver/cache/structuredcachestore.cpp
parentMerge pull request #120 from EpicGames/de/fix-failed-to-finalize-file (diff)
downloadzen-3f3e91a6a1721a1a532ed296dd6e830fcfda8118.tar.xz
zen-3f3e91a6a1721a1a532ed296dd6e830fcfda8118.zip
We need to make each Cache Key contribution per bucket unique even across namespaces
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
-rw-r--r--zenserver/cache/structuredcachestore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp
index bc60a1d26..330534528 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(fmt::format("{}", reinterpret_cast<void*>(this)), 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(fmt::format("{}", reinterpret_cast<void*>(this)));
std::vector<IoHash> DeleteCacheKeys;
DeleteCacheKeys.reserve(ExpiredCacheKeys.size());
GcCtx.FilterCas(ExpiredCacheKeys, [&](const IoHash& ChunkHash, bool Keep) {