Skip to content

Commit

Permalink
fix(services/fs,hdfs): fix poll_close when retry
Browse files Browse the repository at this point in the history
  • Loading branch information
hoslo committed Feb 4, 2024
1 parent ca947b4 commit d1b400a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test_edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,4 @@ jobs:
env:
OPENDAL_FS_ROOT: /tmp/test_dir
RUST_BACKTRACE: 1
RUST_LOG: debug
10 changes: 10 additions & 0 deletions core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions core/edge/file_close_with_retry_on_full_disk/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

use std::env;

use opendal::layers::LoggingLayer;
use opendal::layers::RetryLayer;
use opendal::services::Fs;
use opendal::Operator;
Expand All @@ -29,6 +30,7 @@ async fn main() -> Result<()> {
builder.root(&env::var("OPENDAL_FS_ROOT").expect("root must be set for this test"));
let op = Operator::new(builder)?
.layer(RetryLayer::new().with_max_times(3))
.layer(LoggingLayer::default())
.finish();

let size = thread_rng().gen_range(512 * 1024 + 1..4 * 1024 * 1024);
Expand Down

0 comments on commit d1b400a

Please sign in to comment.