From 6c17ee29a5f31570f416b2075a0630f7ef35cc29 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Thu, 10 Nov 2022 06:59:54 -0500 Subject: [PATCH] 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> --- parquet_file/src/storage.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/parquet_file/src/storage.rs b/parquet_file/src/storage.rs index c4702fc246..963bab4618 100644 --- a/parquet_file/src/storage.rs +++ b/parquet_file/src/storage.rs @@ -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))