From fcfe36fa2cc5d83db756f988210dfe587b77d06c Mon Sep 17 00:00:00 2001 From: Marco Neumann Date: Thu, 11 Jan 2024 11:43:09 +0100 Subject: [PATCH] refactor: log server error during object store retries (#5294) Similar to transport errors, log the server error as well. That should help debugging. --- object_store/src/client/retry.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/object_store/src/client/retry.rs b/object_store/src/client/retry.rs index 9d21867d8a47..fbd3645d2780 100644 --- a/object_store/src/client/retry.rs +++ b/object_store/src/client/retry.rs @@ -246,7 +246,13 @@ impl RetryExt for reqwest::RequestBuilder { let sleep = backoff.next(); retries += 1; - info!("Encountered server error, backing off for {} seconds, retry {} of {}", sleep.as_secs_f32(), retries, max_retries); + info!( + "Encountered server error, backing off for {} seconds, retry {} of {}: {}", + sleep.as_secs_f32(), + retries, + max_retries, + e, + ); tokio::time::sleep(sleep).await; } }, @@ -277,7 +283,13 @@ impl RetryExt for reqwest::RequestBuilder { } let sleep = backoff.next(); retries += 1; - info!("Encountered transport error ({}) backing off for {} seconds, retry {} of {}", e, sleep.as_secs_f32(), retries, max_retries); + info!( + "Encountered transport error backing off for {} seconds, retry {} of {}: {}", + sleep.as_secs_f32(), + retries, + max_retries, + e, + ); tokio::time::sleep(sleep).await; } }