Skip to content

Commit

Permalink
fix: opendal Writer not closed (#1)
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo committed Apr 23, 2023
1 parent bc16543 commit 17d3ddb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ hex = "0.4.3"
serde = { version = "1.0.160", features = ["derive"] }
serde_json = "1.0.96"
phf = { version = "0.11", features = ["macros"] }
opendal = "0.32.0"
opendal = "0.33.0"
4 changes: 3 additions & 1 deletion src/cache/storage/opendal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ impl Cache for OpendalStorage {
write_metadata_prefix(&mut writer, &metadata).await?;

while let Some(part) = value.next().await {
writer.append(part).await?;
writer.write(part).await?;
}

writer.close().await?;

Ok(())
}
}

0 comments on commit 17d3ddb

Please sign in to comment.