Skip to content

Commit

Permalink
[proxy] Do not fail after parquet upload error (#7858)
Browse files Browse the repository at this point in the history
## Problem

If the parquet upload was unsuccessful, it will panic.

## Summary of changes

Write error in logs instead.
  • Loading branch information
khanova committed May 23, 2024
1 parent 8f3c316 commit cd6d811
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions proxy/src/context/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ async fn upload_parquet(
"{year:04}/{month:02}/{day:02}/{hour:02}/requests_{id}.parquet"
))?;
let cancel = CancellationToken::new();
backoff::retry(
let maybe_err = backoff::retry(
|| async {
let stream = futures::stream::once(futures::future::ready(Ok(data.clone())));
storage
Expand All @@ -372,7 +372,12 @@ async fn upload_parquet(
.await
.ok_or_else(|| anyhow::Error::new(TimeoutOrCancel::Cancel))
.and_then(|x| x)
.context("request_data_upload")?;
.context("request_data_upload")
.err();

if let Some(err) = maybe_err {
tracing::warn!(%id, %err, "failed to upload request data");
}

Ok(buffer.writer())
}
Expand Down

1 comment on commit cd6d811

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3196 tests run: 3056 passed, 0 failed, 140 skipped (full report)


Flaky tests (2)

Postgres 15

  • test_statvfs_pressure_usage: release
  • test_vm_bit_clear_on_heap_lock: release

Code coverage* (full report)

  • functions: 31.4% (6450 of 20544 functions)
  • lines: 48.3% (49867 of 103274 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
cd6d811 at 2024-05-23T10:59:14.409Z :recycle:

Please sign in to comment.