feat: make logging clearer when parquet files upload is retried (#6056)
* feat: log success when parquet files are retried * fix: Update parquet_file/src/storage.rs Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com> * fix: fmt Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>pull/24376/head
parent
664b0578e9
commit
6c17ee29a5
|
@ -242,9 +242,18 @@ impl ParquetStorage {
|
|||
// This is abort-able by the user by dropping the upload() future.
|
||||
//
|
||||
// Cloning `data` is a ref count inc, rather than a data copy.
|
||||
let mut retried = false;
|
||||
while let Err(e) = self.object_store.put(&path, data.clone()).await {
|
||||
error!(error=%e, ?meta, "failed to upload parquet file to object storage");
|
||||
warn!(error=%e, ?meta, "failed to upload parquet file to object storage, retrying");
|
||||
tokio::time::sleep(Duration::from_secs(1)).await;
|
||||
retried = true;
|
||||
}
|
||||
|
||||
if retried {
|
||||
info!(
|
||||
?meta,
|
||||
"Succeeded uploading files to object storage on retry"
|
||||
);
|
||||
}
|
||||
|
||||
Ok((parquet_meta, file_size))
|
||||
|
|
Loading…
Reference in New Issue