You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "suyanhanx (via GitHub)" <gi...@apache.org> on 2023/06/21 11:18:33 UTC
[GitHub] [incubator-opendal] suyanhanx commented on a diff in pull request #2508: feat: Implement sink for services s3
suyanhanx commented on code in PR #2508:
URL: https://github.com/apache/incubator-opendal/pull/2508#discussion_r1236821095
##########
core/src/services/s3/writer.rs:
##########
@@ -192,11 +194,15 @@ impl oio::Write for S3Writer {
}
}
- async fn sink(&mut self, _size: u64, _s: oio::Streamer) -> Result<()> {
- Err(Error::new(
- ErrorKind::Unsupported,
- "Write::sink is not supported",
- ))
+ async fn sink(&mut self, size: u64, s: oio::Streamer) -> Result<()> {
+ if self.op.content_length().unwrap_or_default() == size {
+ return self.write_oneshot(size, AsyncBody::Stream(s)).await;
Review Comment:
😢I thought you were going to implement a separate sink.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org