Skip to content

Commit 51f8b10

Browse files
committed
Avoid a panic on task abort in Persist snapshotting
Cancellation can only happen when the Tokio runtime is being shut down, so it shouldn't have meaningful production impact, but it does cause some noise in testing. Use the prebuilt solution for it.
1 parent 9417762 commit 51f8b10

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/persist-client/src/iter.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use futures_util::StreamExt;
2626
use futures_util::stream::FuturesUnordered;
2727
use itertools::Itertools;
2828
use mz_ore::soft_assert_eq_or_log;
29-
use mz_ore::task::JoinHandle;
29+
use mz_ore::task::{JoinHandle, JoinHandleExt};
3030
use mz_persist::indexed::encoding::BlobTraceUpdates;
3131
use mz_persist::location::Blob;
3232
use mz_persist::metrics::ColumnarMetrics;
@@ -597,9 +597,7 @@ where
597597

598598
let wrong_sort = data.run_meta.order != Some(RunOrder::Structured);
599599
let fetch_result: anyhow::Result<FetchResult<T>> = match task.take() {
600-
Some(handle) => handle
601-
.await
602-
.unwrap_or_else(|join_err| Err(anyhow!(join_err))),
600+
Some(handle) => handle.wait_and_assert_finished().await,
603601
None => {
604602
data.clone()
605603
.fetch(

0 commit comments

Comments
 (0)