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 11, 2024
1 parent db81108 commit 41b01a5
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 41b01a5

Please sign in to comment.