Skip to content

Commit

Permalink
Update src/file_pipe_log/pipe.rs
Browse files Browse the repository at this point in the history
Co-authored-by: lucasliang <[email protected]>
  • Loading branch information
v01dstar and LykxSassinator authored Nov 7, 2023
1 parent 409ab3a commit 9b14b92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/file_pipe_log/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ impl<F: FileSystem> SinglePipe<F> {
// - [3] Both main-dir and spill-dir have several recycled logs.
// But as `bytes.len()` is always smaller than `target_file_size` in common
// cases, this issue will be ignored temprorarily.
self.rotate_imp(&mut writable_file)?;
if let Err(e) = self.rotate_imp(&mut writable_file) && is_no_space_err(&e) {
return Err(e);
}
// If there still exists free space for this record, rotate the file
// and return a special TryAgain Err (for retry) to the caller.
return Err(Error::TryAgain(format!(
Expand Down

0 comments on commit 9b14b92

Please sign in to comment.