Skip to content

Commit

Permalink
flush if over sized
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiangxu committed Apr 8, 2024
1 parent d0efd02 commit ad85d3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ impl<'file, const SIZE: usize> WriteBuffer<'file, SIZE> {
};

self.len += size;
if self.len > SIZE {
self.flush()?;
}
Ok(node_id)
}
}
Expand Down

0 comments on commit ad85d3f

Please sign in to comment.