Skip to content

Commit

Permalink
fix(object store): do not call abort when streaming upload finish err…
Browse files Browse the repository at this point in the history
…or and fix azure workload identity (#16961)
  • Loading branch information
wcy-fdu authored May 28, 2024
1 parent 04cd1b5 commit 469c380
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ futures-timer = { git = "https://github.com/madsim-rs/futures-timer.git", rev =
# patch: unlimit 4MB message size for grpc client
etcd-client = { git = "https://github.com/risingwavelabs/etcd-client.git", rev = "4e84d40" }
# todo(wcy-fdu): remove this patch fork after opendal release a new version to apply azure workload identity change.
reqsign = { git = "https://github.com/wcy-fdu/reqsign.git", rev = "002ee2a" }
reqsign = { git = "https://github.com/wcy-fdu/reqsign.git", rev = "c7dd668" }
# patch to remove preserve_order from serde_json
deno_core = { git = "https://github.com/bakjos/deno_core", rev = "9b241c6" }
# patch to user reqwest 0.12.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,7 @@ impl ObjectStore for OpendalObjectStore {
}

fn support_streaming_upload(&self) -> bool {
match self.engine_type {
EngineType::Azblob => false,
_ => self.op.info().native_capability().write_can_multi,
}
self.op.info().native_capability().write_can_multi
}
}

Expand Down Expand Up @@ -300,7 +297,10 @@ impl StreamingUploader for OpendalStreamingUploader {
match self.writer.close().await {
Ok(_) => (),
Err(err) => {
self.writer.abort().await?;
// Due to a bug in OpenDAL, calling `abort()` here may trigger unreachable code and cause panic.
// refer to https://github.com/apache/opendal/issues/4651
// This will be fixed after the next bump in the opendal version.
// self.writer.abort().await?;
return Err(err.into());
}
};
Expand Down

0 comments on commit 469c380

Please sign in to comment.