From 469c38060724d8dcc20533709a7c4dee97079c86 Mon Sep 17 00:00:00 2001 From: congyi wang <58715567+wcy-fdu@users.noreply.github.com> Date: Tue, 28 May 2024 15:18:57 +0800 Subject: [PATCH] fix(object store): do not call abort when streaming upload finish error and fix azure workload identity (#16961) --- Cargo.lock | 2 +- Cargo.toml | 2 +- .../src/object/opendal_engine/opendal_object_store.rs | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b398285c98948..4b27d8901dc36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9747,7 +9747,7 @@ dependencies = [ [[package]] name = "reqsign" version = "0.14.9" -source = "git+https://github.com/wcy-fdu/reqsign.git?rev=002ee2a#002ee2a41749b08bb5336f344e31f514d8fce718" +source = "git+https://github.com/wcy-fdu/reqsign.git?rev=c7dd668#c7dd668764ada1e7477177cfa913fec24252dd34" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index a755e705277bc..96f647a634f38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 diff --git a/src/object_store/src/object/opendal_engine/opendal_object_store.rs b/src/object_store/src/object/opendal_engine/opendal_object_store.rs index 13229a110e754..47ca4f362702a 100644 --- a/src/object_store/src/object/opendal_engine/opendal_object_store.rs +++ b/src/object_store/src/object/opendal_engine/opendal_object_store.rs @@ -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 } } @@ -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()); } };