Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip committed Dec 31, 2024
1 parent 8b36c12 commit f02afa6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x-pack/apm-server/sampling/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,13 @@ func (p *Processor) Run() error {
return nil
case <-ticker.C:
if p.eventStore.storageLimitTracker.isStuck() {
p.logger.Warn("all writes are failing due to storage limit, trying to flatten db to release storage space")
p.eventStore.storageLimitTracker.flattenMu.Lock()
err = p.config.DB.Flatten(3)
if err != nil {
p.logger.With(logp.Error(err)).Warnf("fail to flatten db")
} else {
p.logger.Warn("flatten successful")
}
p.eventStore.storageLimitTracker.flattenMu.Unlock()
}
Expand Down

0 comments on commit f02afa6

Please sign in to comment.