Skip to content

Commit

Permalink
refactor: log server error during object store retries (#5294)
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 authored Jan 11, 2024
1 parent db81108 commit fcfe36f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions 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 {}: {}",
sleep.as_secs_f32(),
retries,
max_retries,
e,
);
tokio::time::sleep(sleep).await;
}
},
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit fcfe36f

Please sign in to comment.