summaryrefslogtreecommitdiff
path: root/src/buildtool/storage/garbage_collector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/storage/garbage_collector.cpp')
-rw-r--r--src/buildtool/storage/garbage_collector.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/buildtool/storage/garbage_collector.cpp b/src/buildtool/storage/garbage_collector.cpp
index 82dbc8d2..7ed8d572 100644
--- a/src/buildtool/storage/garbage_collector.cpp
+++ b/src/buildtool/storage/garbage_collector.cpp
@@ -97,12 +97,16 @@ auto GarbageCollector::GlobalUplinkActionCacheEntry(
}
auto GarbageCollector::GlobalUplinkTargetCacheEntry(
- TargetCacheKey const& key) noexcept -> bool {
+ TargetCacheKey const& key,
+ std::optional<std::string> const& shard) noexcept -> bool {
// Try to find target-cache entry in all generations.
- auto const& latest_tc = Storage::Generation(0).TargetCache();
+ auto const& latest_tc =
+ Storage::Generation(0).TargetCache().WithShard(shard);
for (std::size_t i = 0; i < StorageConfig::NumGenerations(); ++i) {
- if (Storage::Generation(i).TargetCache().LocalUplinkEntry(latest_tc,
- key)) {
+ if (Storage::Generation(i)
+ .TargetCache()
+ .WithShard(shard)
+ .LocalUplinkEntry(latest_tc, key)) {
return true;
}
}