Skip to content

Commit

Permalink
Delete everything
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-sekara committed Apr 24, 2024
1 parent 17ba85f commit c56eb31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/chains/evm/logpoller/log_poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ func (lp *logPoller) backgroundWorkerRun() {
return
case <-blockPruneTick:
blockPruneTick = time.After(utils.WithJitter(1000 * time.Second))
lp.logPrunePageSize = 0 // Enforce deleting all at once
lp.keepFinalizedBlocksDepth = 1000
if allRemoved, err := lp.PruneOldBlocks(lp.ctx); err != nil {
lp.lggr.Errorw("Unable to prune old blocks", "err", err)
Expand All @@ -620,6 +621,7 @@ func (lp *logPoller) backgroundWorkerRun() {
blockPruneTick = time.After(utils.WithJitter(lp.pollPeriod * 100))
}
case <-logPruneTick:
lp.logPrunePageSize = 0 // Enforce deleting all at once
logPruneTick = time.After(utils.WithJitter(2401 * time.Second)) // = 7^5 avoids common factors with 1000
if allRemoved, err := lp.PruneExpiredLogs(lp.ctx); err != nil {
lp.lggr.Errorw("Unable to prune expired logs", "err", err)
Expand Down

0 comments on commit c56eb31

Please sign in to comment.