Skip to content

Commit

Permalink
fix: bootstrap queue size check
Browse files Browse the repository at this point in the history
  • Loading branch information
kamikazechaser committed Aug 5, 2024
1 parent fe01fd1 commit 886f90d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions internal/backfiller/backfiller.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ const verifierInterval = 20 * time.Second

func New(o BackfillerOpts) *backfiller {
return &backfiller{
db: o.DB,
logg: o.Logg,
queue: o.Queue,
stopCh: make(chan struct{}),
ticker: time.NewTicker(verifierInterval),
maxQueueSize: o.MaxQueueSize,
db: o.DB,
logg: o.Logg,
queue: o.Queue,
stopCh: make(chan struct{}),
ticker: time.NewTicker(verifierInterval),
}
}

Expand Down Expand Up @@ -87,7 +88,7 @@ func (b *backfiller) Run(skipLatest bool) error {

if missingBlocksCount > 0 {
if missingBlocksCount >= uint(b.maxQueueSize) {
b.logg.Warn("large number of blocks missing this may result in degraded RPC performance set FORCE_BACKFILL=* to continue", "missing_blocks", missingBlocksCount)
b.logg.Warn("large number of blocks missing this may result in degraded RPC performance set FORCE_BACKFILL=* to continue", "missing_blocks", missingBlocksCount, "max_queue_size", b.maxQueueSize)
_, ok := os.LookupEnv("FORCE_BACKFILL")
if !ok {
os.Exit(0)
Expand Down

0 comments on commit 886f90d

Please sign in to comment.