Skip to content

Commit

Permalink
fix: do not truncate when open wal (#322)
Browse files Browse the repository at this point in the history
Signed-off-by: MrCroxx <[email protected]>
  • Loading branch information
MrCroxx authored Apr 11, 2024
1 parent 5091da9 commit 1785d76
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions foyer-experimental/src/wal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,9 @@ impl<H: HashValue> TombstoneLog<H> {

path.push(format!("tombstone-{:08X}", config.id));

let file = OpenOptions::new()
.write(true)
.read(true)
.create(true)
.truncate(true)
.open(path)?;
// TODO(MrCroxx): use `expect` after `lint_reasons` is stable.
#[allow(clippy::suspicious_open_options)]
let file = OpenOptions::new().write(true).read(true).create(true).open(path)?;

let inner = Arc::new(TombstoneLogInner {
inflights: Mutex::new(vec![]),
Expand Down

0 comments on commit 1785d76

Please sign in to comment.