This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch poll-write
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/poll-write by this push:
     new fa40ba31a Fix oneshort flush
fa40ba31a is described below

commit fa40ba31acf5c0fe05723819810af38bf862d211
Author: Xuanwo <[email protected]>
AuthorDate: Mon Sep 11 17:27:34 2023 +0800

    Fix oneshort flush
    
    Signed-off-by: Xuanwo <[email protected]>
---
 core/src/raw/oio/write/one_shot_write.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/src/raw/oio/write/one_shot_write.rs 
b/core/src/raw/oio/write/one_shot_write.rs
index b798da5a4..7d6429864 100644
--- a/core/src/raw/oio/write/one_shot_write.rs
+++ b/core/src/raw/oio/write/one_shot_write.rs
@@ -89,7 +89,10 @@ impl<W: OneShotWrite> oio::Write for OneShotWriter<W> {
     }
 
     fn poll_abort(&mut self, _: &mut Context<'_>) -> Poll<Result<()>> {
-        Poll::Ready(Ok(()))
+        Poll::Ready(Err(Error::new(
+            ErrorKind::Unsupported,
+            "OneShotWriter doesn't support abort since all content has been 
flushed",
+        )))
     }
 
     fn poll_close(&mut self, _: &mut Context<'_>) -> Poll<Result<()>> {

Reply via email to