From d1dc5cce32ba20c0dae13aecf63e88fe8ead899f Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 2 Jun 2025 11:42:14 +0200 Subject: ParallelRetrieveToCasWithCache: abort early on failure ... and do mark artifacts internally as synchronized. First all all, we will abort anyway, to the entry won't even be read and, secondly it is not necessarily true that the artifact is synchronized. --- src/buildtool/execution_api/remote/bazel/bazel_api.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp index f15d421d..c90b7024 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp @@ -450,6 +450,10 @@ auto BazelApi::CreateAction( return false; } + if (failure) { + return false; + } + try { for (auto const& info : artifacts_info) { done->insert(info); @@ -461,7 +465,7 @@ auto BazelApi::CreateAction( ex.what()); } - return not failure; + return true; } [[nodiscard]] auto BazelApi::RetrieveToMemory( -- cgit v1.2.3