diff --git a/core/src/services/oss/appender.rs b/core/src/services/oss/appender.rs index 71eb1b69c92d..b327d824931a 100644 --- a/core/src/services/oss/appender.rs +++ b/core/src/services/oss/appender.rs @@ -39,7 +39,6 @@ pub struct OssAppender { } impl OssAppender { - #[allow(dead_code)] pub fn new(core: Arc, path: &str, op: OpAppend) -> Self { Self { core, diff --git a/core/src/services/oss/backend.rs b/core/src/services/oss/backend.rs index 7b7320840857..ee51da54597c 100644 --- a/core/src/services/oss/backend.rs +++ b/core/src/services/oss/backend.rs @@ -37,6 +37,7 @@ use super::writer::OssWriter; use crate::ops::*; use crate::raw::*; use crate::*; +use crate::services::oss::appender::OssAppender; const DEFAULT_WRITE_MIN_SIZE: usize = 8 * 1024 * 1024; /// Aliyun Object Storage Service (OSS) support @@ -441,7 +442,7 @@ impl Accessor for OssBackend { type BlockingReader = (); type Writer = OssWriter; type BlockingWriter = (); - type Appender = (); + type Appender = OssAppender; type Pager = OssPager; type BlockingPager = (); @@ -538,6 +539,13 @@ impl Accessor for OssBackend { )) } + async fn append(&self, path: &str, args: OpAppend) -> Result<(RpAppend, Self::Appender)> { + Ok(( + RpAppend::default(), + OssAppender::new(self.core.clone(), path, args), + )) + } + async fn copy(&self, from: &str, to: &str, _args: OpCopy) -> Result { let resp = self.core.oss_copy_object(from, to).await?; let status = resp.status();