summaryrefslogtreecommitdiff
path: root/src/buildtool/main/build_utils.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-03-19 16:56:26 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-03-19 17:39:18 +0100
commit62ceea46f33fe6a6704b40aaa2c980c8b29eff5e (patch)
treefde64d5ff8f739b1dc7de8c48f45dadf1b869a87 /src/buildtool/main/build_utils.cpp
parentc5344fadd9a032171eed799aa1d91dc9247c810f (diff)
downloadjustbuild-62ceea46f33fe6a6704b40aaa2c980c8b29eff5e.tar.gz
serve target: Fix sharding inconsistencies
When running in single node, serve endpoint should not even consider sharding. Additionally, garbage collection uplinking should also take the shard into account. For this purpose, a TargetCache instance now remembers if it was explicitly sharded and passed that information to the GarbageCollector for uplinking.
Diffstat (limited to 'src/buildtool/main/build_utils.cpp')
-rw-r--r--src/buildtool/main/build_utils.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/buildtool/main/build_utils.cpp b/src/buildtool/main/build_utils.cpp
index 492e80d6..5b8d142d 100644
--- a/src/buildtool/main/build_utils.cpp
+++ b/src/buildtool/main/build_utils.cpp
@@ -83,15 +83,6 @@ auto CreateTargetCacheWriterMap(
TargetCacheKey tc_key{key};
// check if entry actually needs storing
if (not cache_targets.contains(tc_key)) {
- // sanity check: if not in the map, then it must be in cache
- if (not tc.Read(tc_key)) {
- (*logger)(
- fmt::format("Target-cache key {} is neither stored "
- "nor marked for storing",
- key.ToString()),
- /*fatal=*/true);
- return;
- }
// entry already in target-cache, so nothing to be done
(*setter)(nullptr);
return;