From 6f053f0dad9f5171401de93594f82fb30715bd45 Mon Sep 17 00:00:00 2001 From: EmilLuta Date: Fri, 7 Feb 2025 12:14:32 +0100 Subject: [PATCH] fix: Add debug information to object store retries Currently, data is in format mode, which strips away a lot of the troubleshooting capabilities. This change marks error as Debug, instead of Display. It will turn entries like: ``` error sending request for url (http://example.invalid/) ``` into: ``` reqwest::Error { kind: Request, url: "http://example.invalid/", source: hyper_util::client::legacy::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" })) } ``` --- core/lib/object_store/src/retries.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/object_store/src/retries.rs b/core/lib/object_store/src/retries.rs index 16d2c1cd55f1..e59266b874d2 100644 --- a/core/lib/object_store/src/retries.rs +++ b/core/lib/object_store/src/retries.rs @@ -41,10 +41,10 @@ impl Request<'_> { Ok(result) => break Ok(result), Err(err) if err.is_retriable() => { if retries > max_retries { - tracing::warn!(%err, "Exhausted {max_retries} retries performing request; returning last error"); + tracing::warn!(?err, "Exhausted {max_retries} retries performing request; returning last error"); break Err(err); } - tracing::info!(%err, "Failed request, retries: {retries}/{max_retries}"); + tracing::info!(?err, "Failed request, retries: {retries}/{max_retries}"); retries += 1; // Randomize sleep duration to prevent stampeding the server if multiple requests are initiated at the same time. let sleep_duration = Duration::from_secs(backoff_secs)