Skip to content

Commit

Permalink
only open segment file after create
Browse files Browse the repository at this point in the history
  • Loading branch information
ylgrgyq committed Sep 9, 2023
1 parent 3a59461 commit b2b4b0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl Segment {
let file = OpenOptions::new()
.read(true)
.write(true)
.create(true)
.create(false)
.open(&path)?;

let mmap = MmapViewSync::from_file(&file, 0, capacity)?;
Expand Down

0 comments on commit b2b4b0f

Please sign in to comment.