[llvm] Debuginfod failed-server cache (PR #74757)

Kevin Frei via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 15:18:51 PST 2023


================
@@ -194,6 +194,26 @@ Error StreamedHTTPResponseHandler::handleBodyChunk(StringRef BodyChunk) {
   return Error::success();
 }
 
+// Create a file cache entry to remember if a given server failed
+Expected<AddStreamFn> CheckServerFailure(FileCache &Cache, uint &Task,
+                                         StringRef ServerUrl) {
+  SmallString<96> CachedServerFailurePath(ServerUrl);
+  llvm::transform(CachedServerFailurePath, CachedServerFailurePath.begin(),
+                  [&](char c) { return std::isalnum(c) ? c : '_'; });
+  CachedServerFailurePath.append(".failed");
+  return Cache(Task, CachedServerFailurePath, "");
----------------
kevinfrei wrote:

Got it: I understand your concerns. There definitely needs to be a way for the user to adjust how sensitive a negative policy is, and a way to reset it easily. This implementation doesn't do the former, and the latter is...non-obvious. I'm going to dig into DEBUGINFO configuration more deeply... (Thanks for the push at misconfigured CURLOPT's). I'll abandon this particular PR.

https://github.com/llvm/llvm-project/pull/74757


More information about the llvm-commits mailing list