Skip to content

Commit

Permalink
Fix test failures
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Zhang <[email protected]>
  • Loading branch information
v01dstar committed Nov 15, 2023
1 parent a59609a commit 0554cd1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/file_pipe_log/log_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ impl<F: FileSystem> LogFileWriter<F> {

pub fn truncate(&mut self) -> Result<()> {
if self.written < self.capacity {
fail_point!("file_pipe_log::log_file_writer::skip_truncate", |_| {});
fail_point!("file_pipe_log::log_file_writer::skip_truncate", |_| {
Ok(())
});
// Panic if truncate fails, in case of data loss.
self.writer.truncate(self.written)?;
self.capacity = self.written;
Expand Down

0 comments on commit 0554cd1

Please sign in to comment.