Skip to content

Commit eaf5520

Browse files
fsdvhdispanser
authored andcommitted
Ignore writer shutdown error (#271)
* ignore writer shutdown error * cargo check
1 parent 76905a1 commit eaf5520

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

datafusion/datasource/src/write/orchestration.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,12 @@ pub(crate) async fn stateless_serialize_and_write_files(
211211

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

219222
if any_errors {

0 commit comments

Comments
 (0)