Skip to content

Commit

Permalink
stats: fix err check
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Aug 22, 2022
1 parent d14a5ca commit 0c7adc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/stats/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,10 @@ func (s *StatsCtx) flush() (cont bool, sleepFor time.Duration) {
if delErr != nil {
// TODO(e.burkov): Improve the algorithm of deleting the oldest bucket
// to avoid the error.
if !errors.Is(delErr, bbolt.ErrBucketNotFound) {
isCommitable = false
if errors.Is(delErr, bbolt.ErrBucketNotFound) {
log.Debug("stats: warning: deleting unit: %s", delErr)
} else {
isCommitable = false
log.Error("stats: deleting unit: %s", delErr)
}
}
Expand Down

0 comments on commit 0c7adc7

Please sign in to comment.