Skip to content

Commit

Permalink
address errcheck issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DStrand1 committed Jun 4, 2024
1 parent 64f4b87 commit 20a35a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion models/buffer_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ func (b *DiskBuffer) resetBatch() {
func (b *DiskBuffer) resetWalFile() {
b.walFile.Close()
os.Remove(b.walFilePath)
walFile, _ := wal.Open(b.walFilePath, nil)
walFile, err := wal.Open(b.walFilePath, nil)
if err != nil {
panic(err)
}
b.walFile = walFile
}

0 comments on commit 20a35a0

Please sign in to comment.