Skip to content

Commit

Permalink
refactor: logging instead of panic on removing tmp files fails
Browse files Browse the repository at this point in the history
Signed-off-by: bsbds <[email protected]>
  • Loading branch information
bsbds authored and Phoenix500526 committed Jun 3, 2024
1 parent 4151d06 commit d3b5fc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/curp/src/server/storage/wal/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ pub(super) struct FilePipeline {
impl FilePipeline {
/// Creates a new `FilePipeline`
pub(super) fn new(dir: PathBuf, file_size: u64) -> io::Result<Self> {
Self::clean_up(&dir)?;
if let Err(e) = Self::clean_up(&dir) {
error!("Failed to clean up tmp files: {e}");
}

let (file_tx, file_rx) = flume::bounded(1);
let dir_c = dir.clone();
Expand Down

0 comments on commit d3b5fc3

Please sign in to comment.