Skip to content

Commit

Permalink
refactor: log server error during object store retries
Browse files Browse the repository at this point in the history
Similar to transport errors, log the server error as well. That should
help debugging.
  • Loading branch information
crepererum committed Jan 10, 2024
1 parent db81108 commit 5f3cdc7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion object_store/src/client/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}: {}",
e,
sleep.as_secs_f32(),
retries,
max_retries,
);
tokio::time::sleep(sleep).await;
}
},
Expand Down

0 comments on commit 5f3cdc7

Please sign in to comment.