aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
-rw-r--r--zenserver/cache/structuredcachestore.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp
index e9c051f88..9cfb5fbf3 100644
--- a/zenserver/cache/structuredcachestore.cpp
+++ b/zenserver/cache/structuredcachestore.cpp
@@ -156,24 +156,6 @@ namespace {
return BucketDir / (std::string("zen") + LegacyDataExtension);
}
- std::vector<DiskIndexEntry> MakeDiskIndexEntries(const std::unordered_map<IoHash, DiskLocation>& MovedChunks,
- const std::vector<IoHash>& DeletedChunks)
- {
- std::vector<DiskIndexEntry> result;
- result.reserve(MovedChunks.size());
- for (const auto& MovedEntry : MovedChunks)
- {
- result.push_back({.Key = MovedEntry.first, .Location = MovedEntry.second});
- }
- for (const IoHash& ChunkHash : DeletedChunks)
- {
- DiskLocation Location;
- Location.Flags |= DiskLocation::kTombStone;
- result.push_back({.Key = ChunkHash, .Location = Location});
- }
- return result;
- }
-
bool ValidateLegacyEntry(const LegacyDiskIndexEntry& Entry, std::string& OutReason)
{
if (Entry.Key == IoHash::Zero)
@@ -1659,8 +1641,8 @@ ZenCacheDiskLayer::CacheBucket::CollectGarbage(GcContext& GcCtx)
m_PayloadAlignment,
false,
[this, &DeletedChunks, &ChunkIndexToChunkHash, &Index, &ReadBlockTimeUs, &ReadBlockLongestTimeUs](
- const std::unordered_map<size_t, BlockStoreLocation>& MovedChunks,
- const std::vector<size_t>& RemovedChunks) {
+ const std::vector<std::pair<size_t, BlockStoreLocation>>& MovedChunks,
+ const std::vector<size_t>& RemovedChunks) {
std::vector<DiskIndexEntry> LogEntries;
LogEntries.reserve(MovedChunks.size() + RemovedChunks.size());
for (const auto& Entry : MovedChunks)