meteorgan commented on code in PR #5562:
URL: https://github.com/apache/opendal/pull/5562#discussion_r1923603379


##########
core/src/raw/adapters/kv/backend.rs:
##########
@@ -297,9 +297,11 @@ impl<S: Adapter> oio::Write for KvWriter<S> {
         Ok(())
     }
 
-    async fn close(&mut self) -> Result<()> {
+    async fn close(&mut self) -> Result<Metadata> {
         let buf = self.buffer.clone().collect();
-        self.kv.set(&self.path, buf).await
+        self.kv.set(&self.path, buf).await?;
+
+        Ok(Metadata::default())

Review Comment:
   Originally, I planned to leave this for later PRs, as I was only prepared to 
implement the logic for `S3`.  However,  since `content_length` is not an 
`Option`, I agree with you - it's better to return `content_length` as the very 
least; otherwise users might be confused by the zero length.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to