Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
benclive committed Jul 16, 2024
1 parent 188f411 commit ed773c9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/ingester-rf1/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func (i *Ingester) starting(ctx context.Context) error {
// start our loop
i.loopDone.Add(1)
go i.loop()
go i.cleanerLoop()
go i.periodicStreamMaintenance()
return nil
}

Expand Down Expand Up @@ -509,11 +509,10 @@ func (i *Ingester) loop() {
}
}

func (i *Ingester) cleanerLoop() {
// No need to signal loopDone wg in this loop, as cleaning is non-essential.
func (i *Ingester) periodicStreamMaintenance() {
// No need to signal loopDone wg in this loop, as the maintenance loop is non-essential.

jit := i.cfg.StreamRetainPeriod / 5
streamRetentionTicker := util.NewTickerWithJitter(i.cfg.StreamRetainPeriod, jit)
streamRetentionTicker := time.NewTicker(i.cfg.StreamRetainPeriod)
defer streamRetentionTicker.Stop()

for {
Expand Down

0 comments on commit ed773c9

Please sign in to comment.