This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs-object-store.git
The following commit(s) were added to refs/heads/main by this push:
new 59e5545 chore(client/retry): include error info in logs when retry
occurs (#487)
59e5545 is described below
commit 59e554516a838cfc09de212a7e1719d5df2f716b
Author: Phil Bracikowski <[email protected]>
AuthorDate: Sat Sep 13 01:16:18 2025 -0700
chore(client/retry): include error info in logs when retry occurs (#487)
On a request retry, it logs an info message stating that an error was
encountered and information about the retry process but it hasn't
included any details about the error that is causing the retry. This PR
updates the logging to include the status if it is a server error and
the http error kind if a transport error occurred. While the last error
when retries are exhausted is returned up the call stack, the
intermediate errors need not be exactly the same. It is helpful to
include some minimum information about what error triggered a retry each
time it happens.
---
src/client/retry.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/client/retry.rs b/src/client/retry.rs
index 2ec1a7c..50cf079 100644
--- a/src/client/retry.rs
+++ b/src/client/retry.rs
@@ -421,7 +421,8 @@ impl RetryableRequest {
let sleep = ctx.backoff();
info!(
- "Encountered server error, backing off for {}
seconds, retry {} of {}",
+ "Encountered server error with status {}, backing
off for {} seconds, retry {} of {}",
+ status,
sleep.as_secs_f32(),
ctx.retries,
ctx.max_retries,
@@ -445,7 +446,8 @@ impl RetryableRequest {
}
let sleep = ctx.backoff();
info!(
- "Encountered transport error backing off for {}
seconds, retry {} of {}: {}",
+ "Encountered transport error of kind {:?}, backing off
for {} seconds, retry {} of {}: {}",
+ e.kind(),
sleep.as_secs_f32(),
ctx.retries,
ctx.max_retries,