Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ghouscht committed Nov 8, 2024
1 parent cd53dd4 commit 951f119
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mvcc/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,11 +471,11 @@ func (b *backend) defrag() error {
tmpdb, err := bolt.Open(tdbp, 0600, &options)
if err != nil {
temp.Close()
if err := os.Remove(temp.Name()); err != nil && b.lg != nil {
if rmErr := os.Remove(temp.Name()); rmErr != nil && b.lg != nil {
b.lg.Error(
"failed to remove temporary file",
zap.String("path", temp.Name()),
zap.Error(err),
zap.Error(rmErr),
)
}

Expand Down

0 comments on commit 951f119

Please sign in to comment.