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
Andrew Lamb 2022-11-10 06:59:54 -05:00 committed by GitHub
parent 664b0578e9
commit 6c17ee29a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -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))