Skip to content

Commit

Permalink
Ignore writer shutdown error (#271)
Browse files Browse the repository at this point in the history
* ignore writer shutdown error

* cargo check
  • Loading branch information
fsdvh authored Sep 25, 2024
1 parent 21376e0 commit 7a23ad6
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,12 @@ pub(crate) async fn stateless_serialize_and_write_files(

// Finalize or abort writers as appropriate
for mut writer in finished_writers.into_iter() {
writer.shutdown()
.await
.map_err(|_| internal_datafusion_err!("Error encountered while finalizing writes! Partial results may have been written to ObjectStore!"))?;
if let Err(e) = writer.shutdown().await {
// ignore if writer already closed
if e.kind() != std::io::ErrorKind::InvalidInput {
return Err(internal_datafusion_err!("Error encountered while finalizing writes! Partial results may have been written to ObjectStore! Error: {e}"));
}
}
}

if any_errors {
Expand Down

0 comments on commit 7a23ad6

Please sign in to comment.