Skip to content

Commit

Permalink
Explicitly get state when error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvolp12 committed Oct 31, 2023
1 parent 04c97db commit d4de487
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bgs/compactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,13 @@ func (c *Compactor) doWork(bgs *BGS) {
time.Sleep(time.Second * 5)
continue
}
state = c.GetState()
log.Errorw("failed to compact repo",
"err", err,
"uid", state.latestUID,
"repo", state.latestDID,
"status", state.status,
"stats", state.stats,
"duration", time.Since(start),
)
// Pause for a bit to avoid spamming failed compactions
Expand Down

0 comments on commit d4de487

Please sign in to comment.