bokket commented on code in PR #3763:
URL:
https://github.com/apache/incubator-opendal/pull/3763#discussion_r1428690662
##########
core/src/services/hdfs/backend.rs:
##########
@@ -262,12 +317,36 @@ impl Accessor for HdfsBackend {
open_options.write(true);
}
- let f = open_options
- .async_open(&p)
- .await
- .map_err(new_std_io_error)?;
+ if let Some(tmp_path) = &tmp_path {
+ let mut t = open_options
+ .async_open(tmp_path.to_str().unwrap())
+ .await
+ .map_err(new_std_io_error)?;
- Ok((RpWrite::new(), HdfsWriter::new(f)))
+ let tmp_path = tmp_path.clone();
+ let target_path = target_path.clone();
+
+ t.flush().await.map_err(new_std_io_error)?;
+ t.close().await.map_err(new_std_io_error)?;
+
+ self.client
+ .rename_file(tmp_path.to_str().unwrap(),
target_path.to_str().unwrap())
Review Comment:
It reproduces the error of cluster CI.I'll fix it later.And now I am leaving
home.
```shell
failures:
behavior::test_fuzz_appender
behavior::test_append_create_append
behavior::test_appender_futures_copy
test result: FAILED. 102 passed; 3 failed; 0 ignored; 0 measured; 0 filtered
out; finished in 13.31s
```
--
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]