Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add a warning here as well.

If this is a quick fix we need for now then it's fine but I don't think we can upstream this as it's not valid in all cases.

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